version: "3.8" services: web: build: . image: my_nginx:1.21.4 networks: - proxy expose: - "80" restart: unless-stopped volumes: - ${DATA_PATH}/html/:/usr/share/nginx/html:ro - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro labels: - "traefik.enable=true" - "traefik.http.middlewares.docs-redirect-websecure.redirectscheme.scheme=https" - "traefik.http.routers.docs-http.middlewares=docs-redirect-websecure" - "traefik.http.routers.docs-http.rule=Host(`${CN}`)" - "traefik.http.routers.docs-http.entrypoints=web" - "traefik.http.routers.docs-https.rule=Host(`${CN}`)" - "traefik.http.routers.docs-https.entrypoints=websecure" - "traefik.http.routers.docs-https.tls=true" - "traefik.http.routers.docs-https.tls.certresolver=myhttpchallenge" - "co.elastic.logs/module=nginx" networks: proxy: external: true