1- version: "3.7"
2-
31services:
42 traefik:
53 image: "traefik:v3.4.0"
64 init: true
75 command:
86 - "--api=true"
7+ - "--ping=true"
8+ - "--entryPoints.ping.address=:9082"
9+ - "--ping.entryPoint=ping"
910 - "--api.dashboard=true"
1011 - "--accesslog=true"
1112 - "--accesslog.format=json"
@@ -22,7 +23,6 @@ services:
2223 - "--entryPoints.metrics.address=:8082"
2324 - "--metrics.prometheus.entryPoint=metrics"
2425 - "--entryPoints.http.address=:80"
25- - "--entryPoints.http.transport.respondingTimeouts.idleTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
2626 - "--entryPoints.http.transport.respondingTimeouts.writeTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
2727 - "--entryPoints.http.transport.respondingTimeouts.readTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
2828 - "--entrypoints.http.http.redirections.entrypoint.to=https"
@@ -31,7 +31,6 @@ services:
3131 - '--entryPoints.postgres.address=:5432'
3232 - '--entryPoints.postgres2.address=:5433'
3333 - "--entryPoints.https.address=:443"
34- - "--entryPoints.https.transport.respondingTimeouts.idleTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
3534 - "--entryPoints.https.transport.respondingTimeouts.writeTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
3635 - "--entryPoints.https.transport.respondingTimeouts.readTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
3736 - "--providers.swarm.endpoint=unix:///var/run/docker.sock"
@@ -43,6 +42,14 @@ services:
4342 - "--tracing.addinternals"
4443 - "--tracing.otlp=true"
4544 - "--tracing.otlp.http=true"
45+ healthcheck:
46+ # NOTE: this healthcheck to check if traefik is up and running must be run on the ping entrypoint defined in command!
47+ test: traefik healthcheck --ping --ping.entryPoint=ping --entryPoints.ping.address=:9082
48+ interval: 10s
49+ timeout: 5s
50+ retries: 5
51+ start_period: 10s
52+ start_interval: 1s
4653 ports:
4754 - target: 80
4855 published: 80
0 commit comments