Health check do publicador em /up e /login em vez de /dashboard

/dashboard exige sessão e responde 302 para /login, também na entrega
activa; o publicador fazia rollback de todas as entregas (c574df4 a
01/12: cinco tentativas com HTTP 302). Passa a exigir HTTP 200 em /up
e em /login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-01 20:45:14 +02:00
co-authored by Claude Opus 5.5
parent c574df4d39
commit 2c24032ec3
+11 -6
View File
@@ -185,8 +185,9 @@ log "Executar health check local."
HEALTH_OK=0
for attempt in 1 2 3 4 5; do
HTTP_CODE="$(
# /dashboard exige sessão e responde 302 para /login; o health check usa
# /up (arranque do Laravel) e /login (página pública renderizada).
health_code() {
/usr/bin/curl \
--noproxy '*' \
--silent \
@@ -195,12 +196,16 @@ for attempt in 1 2 3 4 5; do
--write-out '%{http_code}' \
--resolve "$HOST:443:127.0.0.1" \
--max-time 15 \
"https://$HOST/dashboard" || true
)"
"https://$HOST$1" || true
}
log "Health check $attempt: HTTP $HTTP_CODE"
for attempt in 1 2 3 4 5; do
UP_CODE="$(health_code /up)"
LOGIN_CODE="$(health_code /login)"
if [ "$HTTP_CODE" = "200" ]; then
log "Health check $attempt: /up HTTP $UP_CODE, /login HTTP $LOGIN_CODE"
if [ "$UP_CODE" = "200" ] && [ "$LOGIN_CODE" = "200" ]; then
HEALTH_OK=1
break
fi