services: app: image: registry.infra.mintel.me/mintel/klz-cables.com:latest restart: always networks: - infra ports: - "3000:3000" env_file: - .env healthcheck: test: ["CMD-SHELL", "curl -f http://127.0.0.1:3000/health || exit 1"] interval: 10s timeout: 5s retries: 5 start_period: 30s labels: - "traefik.enable=true" # HTTP ⇒ HTTPS redirect - "traefik.http.routers.klz-cables-web.rule=(Host(`klz-cables.com`) || Host(`www.klz-cables.com`) || Host(`staging.klz-cables.com`)) && !PathPrefix(`/.well-known/acme-challenge/`)" - "traefik.http.routers.klz-cables-web.entrypoints=web" - "traefik.http.routers.klz-cables-web.middlewares=redirect-https" # HTTPS router - "traefik.http.routers.klz-cables.rule=Host(`klz-cables.com`) || Host(`www.klz-cables.com`) || Host(`staging.klz-cables.com`)" - "traefik.http.routers.klz-cables.entrypoints=websecure" - "traefik.http.routers.klz-cables.tls.certresolver=le" - "traefik.http.routers.klz-cables.tls=true" - "traefik.http.routers.klz-cables.service=klz-cables" - "traefik.http.services.klz-cables.loadbalancer.server.port=3000" - "traefik.http.services.klz-cables.loadbalancer.server.scheme=http" # Forwarded Headers - "traefik.http.middlewares.klz-forward.headers.customrequestheaders.X-Forwarded-Proto=https" - "traefik.http.middlewares.klz-forward.headers.customrequestheaders.X-Forwarded-Ssl=on" # Middlewares - "traefik.http.routers.klz-cables.middlewares=klz-forward,compress" networks: infra: external: true