# docker-compose.yml version: "3.7" secrets: # paths assume the .secrets folder is sibling depth to folder where docker-compose resides DB_ROOT_PWD: file: ../.secrets/db_root_pwd.txt MYSQL_PWD: file: ../.secrets/mysql_pwd.txt # networks: # npm-bridge: # arbitrary name # driver: bridge services: mariadb: image: ahgraber/mariadb-aria:test container_name: mariadb secrets: - DB_ROOT_PWD - MYSQL_PWD # networks: # - npm-bridge # ports: # - 3306:3306 environment: # MYSQL_ROOT_PASSWORD: "npm" MYSQL_ROOT_PASSWORD__FILE: /run/secrets/DB_ROOT_PWD MYSQL_DATABASE: "npm" MYSQL_USER: "npm" # MYSQL_PASSWORD: "npm" MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD volumes: - ./data/mysql:/var/lib/mysql # - npm-mount:/var/lib/mysql # restart: unless-stopped npm: build: context: . dockerfile: ./Dockerfile # args: # TARGETPLATFORM: arm64v8 image: nginx-proxy-manager:test # provide a name and tag for the image container_name: npm secrets: - MYSQL_PWD # networks: # - npm-bridge ports: - 8080:80 - 8443:443 - 8888:81 environment: DISABLE_IPV6: 'true' DB_MYSQL_HOST: "mariadb" DB_MYSQL_PORT: 3306 DB_MYSQL_NAME: "npm" DB_MYSQL_USER: "npm" # DB_MYSQL_PASSWORD: "npm" DB_MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD # DB_MYSQL_PASSWORD: "sqlL3tm3in" volumes: - ./data/npm:/data - ./data/letsencrypt:/etc/letsencrypt # - npm-mount:/data # - letsencrypt-mount:/etc/letsencrypt depends_on: - mariadb # restart: unless-stopped # ## https://stackoverflow.com/questions/45282608/how-to-directly-mount-nfs-share-volume-in-container-using-docker-compose-v3 # volumes: # npm-mount: # driver: local # driver_opts: # type: nfs # o: nfsvers=4,addr=10.2.1.1,rw,retry=1,soft,nolock # device: ":/npm" # letsencrypt-mount: # driver: local # driver_opts: # type: nfs # o: nfsvers=4,addr=10.2.1.1,rw,retry=1,soft,nolock # device: ":/letsencrypt"