Add healthcheck to Traefik (ping endpoint)
Enable --ping=true and use traefik healthcheck --ping. Lightweight binary call inside the container, no extra tooling needed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ services:
|
||||
command:
|
||||
- --api.dashboard=true
|
||||
- --api.insecure=false
|
||||
- --ping=true
|
||||
- --providers.docker=true
|
||||
- --providers.docker.exposedbydefault=false
|
||||
- --providers.docker.network=frontend_net
|
||||
@@ -46,6 +47,12 @@ services:
|
||||
- frontend_net
|
||||
- backend_net
|
||||
- monitoring_net
|
||||
healthcheck:
|
||||
test: ["CMD", "traefik", "healthcheck", "--ping"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=frontend_net
|
||||
|
||||
Reference in New Issue
Block a user