update health check
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user