diff --git a/docker-compose.yaml b/docker-compose.yaml index 93b45012f46ba45ccce09aa762cefda2ebd38820..8f94c972b720fe52f9850b10dc9c992a10cff086 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -34,13 +34,25 @@ services: nginx: image: nginx:1.25.4 restart: unless-stopped - ports: - - 8080:80 networks: - default volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro + labels: + traefik.enable: true + traefik.http.routers.tileserver_http.entrypoints: web + traefik.http.routers.tileserver_http.middlewares: https_redirect@file + traefik.http.routers.tileserver_https.entrypoints: websecure + traefik.http.routers.tileserver_https.rule: Host(`tileserver.maps.metager.de`) + traefik.http.routers.tileserver_https.middlewares: tileserversts + traefik.http.routers.tileserver_https.service: tileserver + traefik.http.routers.tileserver_https.tls: true + traefik.http.routers.tileserver_https.tls.certresolver: letsencrypt + traefik.http.services.tileserver.loadbalancer.server.port: 80 + traefik.http.middlewares.tileserversts.headers.stsincludesubdomains: false + traefik.http.middlewares.tileserversts.headers.stspreload: true + traefik.http.middlewares.tileserversts.headers.stsseconds: 31536000 networks: traefik: external: true