From e76f253c0a42983c666b60c0bbf5e2565b989a17 Mon Sep 17 00:00:00 2001 From: Dev Server Date: Thu, 12 Feb 2026 23:27:45 +0300 Subject: [PATCH] fix: make health check non-blocking --- .gitea/workflows/deploy-dev.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy-dev.yml b/.gitea/workflows/deploy-dev.yml index e78698d..d111125 100644 --- a/.gitea/workflows/deploy-dev.yml +++ b/.gitea/workflows/deploy-dev.yml @@ -52,13 +52,14 @@ jobs: echo "📊 Checking Docker containers status..." docker compose ps echo "🏥 Checking health endpoint..." - for i in {1..5}; do - if curl -f http://localhost:8124/health/ > /dev/null 2>&1; then - echo "✅ Health check passed" - exit 0 + HEALTH_RESPONSE=$(curl -s http://localhost:8124/health/ || echo "") + 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) + if echo "$HEALTH_RESPONSE" | grep -q '"database".*"healthy"'; then + echo "✅ Database is healthy" fi - echo "Attempt $i failed, retrying in 5 seconds..." - sleep 5 - done - echo "⚠️ Health check failed, but deployment completed" - curl http://localhost:8124/health/ || echo "Health endpoint not available" + else + echo "⚠️ Health endpoint not available, but deployment completed" + fi