Última actividad 1733252735

Expose web services on your network · Free SSL with Let's Encrypt · Designed with security in mind · Perfect for home networks: By creating a custom Docker network, you don't need to publish ports for your upstream services to all of the Docker host's interfaces.

emanuelegori's Avatar emanuelegori revisó este gist 1733252735. Ir a la revisión

Sin cambios

emanuelegori's Avatar emanuelegori revisó este gist 1733252622. Ir a la revisión

Sin cambios

emanuelegori's Avatar emanuelegori revisó este gist 1733252562. Ir a la revisión

1 file changed, 71 insertions

docker-compose.yml(archivo creado)

@@ -0,0 +1,71 @@
1 + secrets:
2 + # Secrets are single-line text files where the sole content is the secret
3 + # Paths in this example assume that secrets are kept in local folder called ".secrets"
4 + DB_ROOT_PWD:
5 + file: .secrets/db_root_pwd.txt
6 + MYSQL_PWD:
7 + file: .secrets/mysql_pwd.txt
8 +
9 + services:
10 + npm:
11 + image: 'jc21/nginx-proxy-manager:latest'
12 + container_name: nginx-proxy-manager
13 + restart: unless-stopped
14 + ports:
15 + # Public HTTP Port:
16 + - '80:80'
17 + # Public HTTPS Port:
18 + - '443:443'
19 + # Admin Web Port:
20 + # - '81:81'
21 + environment:
22 + # PUID: 1000
23 + # ID: 1000
24 + # These are the settings to access your db
25 + DB_MYSQL_HOST: "db"
26 + DB_MYSQL_PORT: 3306
27 + DB_MYSQL_USER: "npm"
28 + # DB_MYSQL_PASSWORD: "npm" # use secret instead
29 + DB_MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD
30 + DB_MYSQL_NAME: "npm"
31 + # If you would rather use Sqlite, remove all DB_MYSQL_* lines above
32 + # Uncomment this if IPv6 is not enabled on your host
33 + DISABLE_IPV6: 'true'
34 + networks:
35 + - npm-internal
36 + volumes:
37 + - ./data:/data
38 + - ./letsencrypt:/etc/letsencrypt
39 + secrets:
40 + - MYSQL_PWD
41 + depends_on:
42 + - db
43 + healthcheck:
44 + test: ["CMD", "/usr/bin/check-health"]
45 + interval: 10s
46 + timeout: 3s
47 +
48 + db:
49 + image: 'jc21/mariadb-aria:latest'
50 + container_name: db
51 + restart: unless-stopped
52 + environment:
53 + # MYSQL_ROOT_PASSWORD: "npm" # use secret instead
54 + MYSQL_ROOT_PASSWORD__FILE: /run/secrets/DB_ROOT_PWD
55 + MYSQL_DATABASE: "npm"
56 + MYSQL_USER: "npm"
57 + # MYSQL_PASSWORD: "npm" # use secret instead
58 + MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD
59 + MARIADB_AUTO_UPGRADE: '1'
60 + networks:
61 + - npm-internal
62 + volumes:
63 + - ./mysql:/var/lib/mysql
64 + secrets:
65 + - DB_ROOT_PWD
66 + - MYSQL_PWD
67 +
68 + networks:
69 + npm-internal:
70 + name: npm-internal
71 + external: true
Siguiente Anterior