fix: simplify health check script
Deploy to Dev / deploy-dev (push) Successful in 26s
Details
Deploy to Dev / deploy-dev (push) Successful in 26s
Details
This commit is contained in:
parent
e76f253c0a
commit
2cfd7f2ede
|
|
@ -48,18 +48,20 @@ jobs:
|
|||
script_stop: true
|
||||
script: |
|
||||
echo "⏳ Waiting for services to start..."
|
||||
sleep 15
|
||||
sleep 10
|
||||
echo "📊 Checking Docker containers status..."
|
||||
docker compose ps
|
||||
docker compose ps | head -10
|
||||
echo ""
|
||||
echo "🏥 Checking health endpoint..."
|
||||
HEALTH_RESPONSE=$(curl -s http://localhost:8124/health/ || echo "")
|
||||
HEALTH_RESPONSE=$(curl -s http://localhost:8124/health/ 2>&1)
|
||||
if [ -n "$HEALTH_RESPONSE" ]; then
|
||||
echo "✅ Health endpoint is responding"
|
||||
echo "$HEALTH_RESPONSE" | head -3
|
||||
# Check if web service is healthy (Celery may be unhealthy, but that's OK)
|
||||
echo "$HEALTH_RESPONSE" | python3 -m json.tool 2>/dev/null | head -10 || echo "$HEALTH_RESPONSE" | head -5
|
||||
if echo "$HEALTH_RESPONSE" | grep -q '"database".*"healthy"'; then
|
||||
echo "✅ Database is healthy"
|
||||
echo "✅ Database is healthy - deployment successful!"
|
||||
else
|
||||
echo "⚠️ Database check unclear, but endpoint responds"
|
||||
fi
|
||||
else
|
||||
echo "⚠️ Health endpoint not available, but deployment completed"
|
||||
echo "⚠️ Health endpoint not available yet, but deployment completed"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue