--- networks: default: name: ${PREFIX} services: adminer: container_name: ${PREFIX}-adminer hostname: ${PREFIX}-adminer image: adminer:4.8.1-standalone labels: - traefik.enable=true - traefik.http.routers.${PREFIX}-adminer.entrypoints=https - traefik.http.routers.${PREFIX}-adminer.rule=Host(`adminer.${APP_URL}`) - traefik.http.routers.${PREFIX}-adminer.tls=true - traefik.http.services.${PREFIX}-adminer.loadbalancer.server.port=8080 app: container_name: ${PREFIX}-app environment: - PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE} - PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE} - XDEBUG_CLIENT_HOST=${XDEBUG_CLIENT_HOST} - XDEBUG_MODE=${XDEBUG_MODE} image: ${APP_IMAGE_TAG} labels: - traefik.enable=true - traefik.http.routers.${PREFIX}-web.entrypoints=http - traefik.http.routers.${PREFIX}-web.middlewares=https-redirect@file - traefik.http.routers.${PREFIX}-web.rule=Host(`${APP_URL}`) - traefik.http.routers.${PREFIX}-webssl.entrypoints=https - traefik.http.routers.${PREFIX}-webssl.rule=Host(`${APP_URL}`) - traefik.http.routers.${PREFIX}-webssl.tls=true - traefik.http.services.${PREFIX}-webssl.loadbalancer.server.port=80 volumes: - webroot:/var/www/html - wp-cli-cache:/var/www/.wp-cli db: command: --default-authentication-plugin=mysql_native_password container_name: ${PREFIX}-db environment: MYSQL_DATABASE: ${DB_NAME} MYSQL_PASSWORD: ${DB_USER_PASSWORD} MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} MYSQL_USER: ${DB_USER} hostname: ${PREFIX}-db image: mariadb:10.4.6-bionic ports: - "${TRAEFIK_LISTENING_IP}:3306:3306" volumes: - db:/var/lib/mysql traefik: container_name: ${PREFIX}-traefik command: ["--configFile=/etc/traefik/static/traefik.yml"] image: traefik:2.5.3 labels: - traefik.enable=true - traefik.http.routers.${PREFIX}-traefik.entrypoints=https - traefik.http.routers.${PREFIX}-traefik.rule=Host(`traefik.${APP_URL}`) - traefik.http.routers.${PREFIX}-traefik.service=api@internal - traefik.http.routers.${PREFIX}-traefik.tls=true ports: - "${TRAEFIK_LISTENING_IP}:80:80" - "${TRAEFIK_LISTENING_IP}:443:443" volumes: - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock:ro - traefik-certs:/certs:ro - traefik-dynamic:/etc/traefik/dynamic:ro - traefik-logs:/logs - traefik-static:/etc/traefik/static:ro version: "3.4" volumes: db: name: ${PREFIX}-db traefik-certs: name: ${PREFIX}-traefik-certs traefik-dynamic: name: ${PREFIX}-traefik-dynamic traefik-logs: name: ${PREFIX}-traefik-logs traefik-static: name: ${PREFIX}-traefik-static webroot: name: ${PREFIX}-webroot wp-cli-cache: name: wp-cli-cache