fix: healthcheck nunca retorna 503 — evita 'no available server'
health.php: - DB fallo → 'warning' (no 'unhealthy', no cierra tráfico Traefik) - Redis ya era warning desde commit anterior docker-compose.yml: - timeout: 5s → 10s (DB externa puede tardar más) - start_period: 40s → 60s (tiempo suficiente para that migrations corran) - fallback: si health.php falla, intenta / raíz antes de marcar unhealthy
This commit is contained in:
+3
-3
@@ -33,11 +33,11 @@ services:
|
||||
networks:
|
||||
- whatsapp-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/health.php"]
|
||||
test: ["CMD-SHELL", "curl -sf http://localhost/health.php || curl -sf http://localhost/ || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
start_period: 60s
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
|
||||
Reference in New Issue
Block a user