This commit is contained in:
@@ -6,10 +6,21 @@ services:
|
||||
- infra
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.klz-cables.rule=Host(klz-cables.com,www.klz-cables.com,staging.klz-cables.com)"
|
||||
|
||||
# HTTP → HTTPS redirect
|
||||
- "traefik.http.routers.klz-cables-web.rule=Host(`klz-cables.com`) || Host(`www.klz-cables.com`)"
|
||||
- "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`)"
|
||||
- "traefik.http.routers.klz-cables.entrypoints=websecure"
|
||||
- "traefik.http.routers.klz-cables.tls.certresolver=le"
|
||||
- "traefik.http.services.klz-cables.loadbalancer.server.port=3000"
|
||||
|
||||
# compression
|
||||
- "traefik.http.routers.klz-cables.middlewares=compress"
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
|
||||
interval: 10s
|
||||
@@ -19,5 +30,4 @@ services:
|
||||
|
||||
networks:
|
||||
infra:
|
||||
name: infra
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user