version: "3" services: http: image: nginx:alpine restart: unless-stopped volumes: - "./html:/usr/share/nginx/html:ro" networks: - "traefik" labels: - "traefik.enable=true" - "traefik.http.routers.web-www-dweipert-de.rule=Host(`www.${DOMAIN}`)" - "traefik.http.routers.web-www-dweipert-de.entrypoints=websecure" - "traefik.http.routers.web-www-dweipert-de.tls.certresolver=letsencrypt" - "traefik.http.routers.web-dweipert-de.rule=Host(`${DOMAIN}`)" - "traefik.http.routers.web-dweipert-de.entrypoints=websecure" - "traefik.http.routers.web-dweipert-de.tls.certresolver=letsencrypt" - "traefik.http.routers.web-dweipert-de.middlewares=web-dweipert-de-www" - "traefik.http.middlewares.web-dweipert-de-www.redirectregex.regex=(.)*" - "traefik.http.middlewares.web-dweipert-de-www.redirectregex.replacement=https://www.${DOMAIN}" - "traefik.http.middlewares.web-dweipert-de-www.redirectregex.permanent=true" networks: traefik: name: "${TRAEFIK_NETWORK}" external: true