From 7553a0c02b6d0805e827ae9ad320968aa410c337 Mon Sep 17 00:00:00 2001 From: Roberto Musso Date: Sat, 11 Apr 2026 17:42:54 +0200 Subject: [PATCH] update health check --- .gitea/workflows/deploy.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 9baf0b4..cffd8b4 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -84,15 +84,14 @@ jobs: # ── Migrations (runs inside the container) ── docker compose exec -T waitlist alembic upgrade head - # ── Health check (curl with correct Host header for Caddy) ── + # ── Health check (directly inside the waitlist container) ── echo "Waiting for app to start..." for i in 1 2 3 4 5; do - HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -H "Host: adiuvai.com" http://localhost:80/health) - if [ "$HTTP_CODE" -eq 200 ]; then - echo "✅ Waitlist service is healthy (HTTP ${HTTP_CODE})" + if docker compose exec -T waitlist python -c "import urllib.request; urllib.request.urlopen('http://localhost:8001/health', timeout=5)" 2>/dev/null; then + echo "✅ Waitlist service is healthy" exit 0 fi - echo " Attempt $i: HTTP ${HTTP_CODE}, retrying..." + echo " Attempt $i: not ready, retrying..." sleep 3 done echo "❌ Health check failed after 5 attempts"