해피 투게더

my cloud mirror gen2 에 nginx proxy manager 설치하기 본문

장난감

my cloud mirror gen2 에 nginx proxy manager 설치하기

보아요 2020. 7. 23. 12:56

추가/

설치는 되는데 동작이 잘되지 않는다.

webhippie/mariadb:latestyobasystems/alpine-mariadb:latest 로 교체해서 다시 테스트

 

폴더 4개를 ssh 로 로그인해서 만든다

nginx-proxy-manager

nginx-proxy-manager/data

nginx-proxy-manager/letsencrypt

nginx-proxy-manager/data/mysql

 

config.json 내용을 아래와 같이 적어둔다

nano /sharedfolders/public/docker/nginx-proxy-manager/config.json

 

{

   "database": {

      "engine": "mysql",

      "host": "db",

      "name": "npm",

      "user": "npm",

      "password": "npm",

      "port": 3306

   }

}

 

아래를 포테이너에 stacks 에 넣고 deploy the stack

 

version: "2"

services:

   app:

      image: jc21/nginx-proxy-manager:latest

      restart: always

      ports:

         # Public HTTP Port:

         - 8180:80

         # Public HTTPS Port:

         - 8443:443

         # Admin Web Port:

         - 8181:81

      volumes:

         # Make sure this config.json file exists as per instructions above:

         - /sharedfolders/public/docker/nginx-proxy-manager/config.json:/app/config/production.json

         - /sharedfolders/public/docker/nginx-proxy-manager/data:/data

         - /sharedfolders/public/docker/nginx-proxy-manager/letsencrypt:/etc/letsencrypt

      depends_on:

         - db

   db:
      image: yobasystems/alpine-mariadb:armhf
      restart: always
      environment:
         MYSQL_ROOT_PASSWORD: "npm"
         MYSQL_DATABASE: "npm"
         MYSQL_USER: "npm"
         MYSQL_PASSWORD: "npm"
      volumes:
         - /sharedfolders/public/docker/nginx-proxy-manager/data/mysql:/var/lib/mysql

      expose:

         - "3306"