version: "3.8" services: db: image: mysql:5.7 # env_file: secrets/db.secrets volumes: - ${DATA_PATH}/db_data:/var/lib/mysql restart: "no" app: depends_on: - db image: wordpress:5.6.2 env_file: secrets/app.secrets volumes: - ${DATA_PATH}/_data:/var/www/html networks: - proxy - default expose: - "80" restart: "no" environment: WORDPRESS_DB_HOST: db:3306 labels: - "traefik.enable=true" - "traefik.docker.network=proxy" - "traefik.http.middlewares.wp-redirect-websecure.redirectscheme.scheme=https" - "traefik.http.routers.wp-http.middlewares=wp-redirect-websecure" - "traefik.http.routers.wp-http.rule=Host(`${CN}`)" - "traefik.http.routers.wp-http.entrypoints=web" - "traefik.http.routers.wp-https.rule=Host(`${CN}`)" - "traefik.http.routers.wp-https.entrypoints=websecure" - "traefik.http.routers.wp-https.tls=true" - "traefik.http.routers.wp-https.tls.certresolver=myhttpchallenge" networks: proxy: external: true