Skip to content

Commit 28660ac

Browse files
committed
Traefik local deployment fixes
1 parent b2d13b7 commit 28660ac

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

services/traefik/docker-compose.local.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ services:
1111
- "--api.dashboard=true"
1212
- "--log.level=${OPS_TRAEFIK_LOGLEVEL}"
1313
- "--accesslog=true"
14+
- "--accesslog.format=json"
15+
- "--accesslog.fields.defaultmode=keep"
16+
- "--accesslog.fields.names.ClientUsername=keep"
17+
- "--accesslog.fields.headers.defaultmode=keep"
18+
- "--accesslog.fields.headers.names.User-Agent=keep"
19+
- "--accesslog.fields.headers.names.Authorization=drop"
20+
- "--accesslog.fields.headers.names.Content-Type=keep"
1421
- "--metrics.prometheus=true"
1522
- "--metrics.prometheus.addEntryPointsLabels=true"
1623
- "--metrics.prometheus.addServicesLabels=true"
@@ -26,6 +33,9 @@ services:
2633
- "--entryPoints.https.transport.respondingTimeouts.writeTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
2734
- "--entryPoints.https.transport.respondingTimeouts.readTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
2835
- "--entryPoints.master_postgres.address=:5432"
36+
- "--entrypoints.http.http.redirections.entrypoint.to=https"
37+
- "--entrypoints.http.http.redirections.entrypoint.scheme=https"
38+
- "--entrypoints.http.http.redirections.entrypoint.permanent=true"
2939
- "--providers.swarm.endpoint=unix:///var/run/docker.sock"
3040
- "--providers.swarm.exposedByDefault=false"
3141
- "--providers.swarm.constraints=!LabelRegex(`io.simcore.zone`, `${TRAEFIK_SIMCORE_ZONE}`)"
@@ -45,12 +55,6 @@ services:
4555
deploy:
4656
placement:
4757
constraints: []
48-
labels:
49-
# redirect http to https
50-
- traefik.http.middlewares.http_to_https.redirectScheme.scheme=https
51-
- traefik.http.routers.http_to_https.rule=HostRegexp(`(?P<host>.+)`)
52-
- traefik.http.routers.http_to_https.entrypoints=http
53-
- traefik.http.routers.http_to_https.middlewares=http_to_https
5458
env_file:
5559
- .env
5660
configs:

0 commit comments

Comments
 (0)