update the deploy
This commit is contained in:
@@ -84,14 +84,17 @@ jobs:
|
|||||||
# ── Migrations (runs inside the container) ──
|
# ── Migrations (runs inside the container) ──
|
||||||
docker compose exec -T waitlist alembic upgrade head
|
docker compose exec -T waitlist alembic upgrade head
|
||||||
|
|
||||||
# ── Health check ──
|
# ── Health check (curl with correct Host header for Caddy) ──
|
||||||
echo "Waiting for app..."
|
echo "Waiting for app to start..."
|
||||||
sleep 5
|
for i in 1 2 3 4 5; do
|
||||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:80/health)
|
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -H "Host: adiuvai.com" http://localhost:80/health)
|
||||||
if [ "$HTTP_CODE" -eq 200 ]; then
|
if [ "$HTTP_CODE" -eq 200 ]; then
|
||||||
echo "✅ Waitlist service is healthy (HTTP ${HTTP_CODE})"
|
echo "✅ Waitlist service is healthy (HTTP ${HTTP_CODE})"
|
||||||
else
|
exit 0
|
||||||
echo "❌ Health check failed (HTTP ${HTTP_CODE})"
|
fi
|
||||||
|
echo " Attempt $i: HTTP ${HTTP_CODE}, retrying..."
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
echo "❌ Health check failed after 5 attempts"
|
||||||
docker compose logs waitlist --tail=50
|
docker compose logs waitlist --tail=50
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user