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:
2026-05-29 15:09:51 +02:00
parent 3daea94982
commit 12b63531d1
+7
View File
@@ -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