fix: simplify health check script
Deploy to Dev / deploy-dev (push) Successful in 26s Details

This commit is contained in:
Dev Server 2026-02-12 23:28:20 +03:00
parent e76f253c0a
commit 2cfd7f2ede
1 changed files with 9 additions and 7 deletions

View File

@ -48,18 +48,20 @@ jobs:
script_stop: true script_stop: true
script: | script: |
echo "⏳ Waiting for services to start..." echo "⏳ Waiting for services to start..."
sleep 15 sleep 10
echo "📊 Checking Docker containers status..." echo "📊 Checking Docker containers status..."
docker compose ps docker compose ps | head -10
echo ""
echo "🏥 Checking health endpoint..." 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 if [ -n "$HEALTH_RESPONSE" ]; then
echo "✅ Health endpoint is responding" echo "✅ Health endpoint is responding"
echo "$HEALTH_RESPONSE" | head -3 echo "$HEALTH_RESPONSE" | python3 -m json.tool 2>/dev/null | head -10 || echo "$HEALTH_RESPONSE" | head -5
# Check if web service is healthy (Celery may be unhealthy, but that's OK)
if echo "$HEALTH_RESPONSE" | grep -q '"database".*"healthy"'; then 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 fi
else else
echo "⚠️ Health endpoint not available, but deployment completed" echo "⚠️ Health endpoint not available yet, but deployment completed"
fi fi