fix: healthcheck uses host curl, not exec inside container

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-05-06 19:35:26 +01:00
parent 162f4ba822
commit 7e9727587e

View file

@ -30,13 +30,13 @@ pass "Container restarted. Alembic migrations run on container start."
# ── 4. Wait and verify ───────────────────────────────────────────────────────
log "Waiting for app to become healthy..."
for i in $(seq 1 15); do
if $COMPOSE exec -T app sh -c "curl -fs http://localhost:8800/cc-dashboard/healthz > /dev/null 2>&1"; then
for i in $(seq 1 20); do
if curl -fs http://localhost:8800/cc-dashboard/healthz > /dev/null 2>&1; then
pass "Healthcheck OK after ${i}s."
break
fi
sleep 1
if [[ $i -eq 15 ]]; then
if [[ $i -eq 20 ]]; then
log "Healthcheck timeout — showing last 40 lines of logs:"
$COMPOSE logs --tail=40 app
die "App did not start in time."