secrets: # Secrets are single-line text files where the sole content is the secret # Paths in this example assume that secrets are kept in local folder called ".secrets" DB_ROOT_PWD: file: .secrets/db_root_pwd.txt MYSQL_PWD: file: .secrets/mysql_pwd.txt services: npm: image: 'jc21/nginx-proxy-manager:latest' container_name: nginx-proxy-manager restart: unless-stopped ports: # Public HTTP Port: - '80:80' # Public HTTPS Port: - '443:443' # Admin Web Port: # - '81:81' environment: # PUID: 1000 # ID: 1000 # These are the settings to access your db DB_MYSQL_HOST: "db" DB_MYSQL_PORT: 3306 DB_MYSQL_USER: "npm" # DB_MYSQL_PASSWORD: "npm" # use secret instead DB_MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD DB_MYSQL_NAME: "npm" # If you would rather use Sqlite, remove all DB_MYSQL_* lines above # Uncomment this if IPv6 is not enabled on your host DISABLE_IPV6: 'true' networks: - npm-internal volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt secrets: - MYSQL_PWD depends_on: - db healthcheck: test: ["CMD", "/usr/bin/check-health"] interval: 10s timeout: 3s db: image: 'jc21/mariadb-aria:latest' container_name: db restart: unless-stopped environment: # MYSQL_ROOT_PASSWORD: "npm" # use secret instead MYSQL_ROOT_PASSWORD__FILE: /run/secrets/DB_ROOT_PWD MYSQL_DATABASE: "npm" MYSQL_USER: "npm" # MYSQL_PASSWORD: "npm" # use secret instead MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD MARIADB_AUTO_UPGRADE: '1' networks: - npm-internal volumes: - ./mysql:/var/lib/mysql secrets: - DB_ROOT_PWD - MYSQL_PWD networks: npm-internal: name: npm-internal external: true