ci: check backend/frontend via docker status in runner container mode
All checks were successful
Deploy to Production / deploy (push) Successful in 24s
All checks were successful
Deploy to Production / deploy (push) Successful in 24s
This commit is contained in:
@@ -58,13 +58,14 @@ jobs:
|
||||
|
||||
- name: Wait for backend health check
|
||||
run: |
|
||||
echo "Waiting for backend to be healthy..."
|
||||
echo "Waiting for backend container health=healthy..."
|
||||
for i in $(seq 1 30); do
|
||||
if curl -sf http://127.0.0.1:18000/api/v1/utils/health-check/ > /dev/null 2>&1; then
|
||||
status=$(docker inspect -f '{{.State.Health.Status}}' full-stack-fastapi-backend-1 2>/dev/null || echo "unknown")
|
||||
if [ "$status" = "healthy" ]; then
|
||||
echo "✅ Backend is healthy!"
|
||||
exit 0
|
||||
fi
|
||||
echo "Attempt $i/30 - waiting 10s..."
|
||||
echo "Attempt $i/30 - status=$status, waiting 10s..."
|
||||
sleep 10
|
||||
done
|
||||
echo "❌ Backend health check failed after 300s"
|
||||
@@ -73,7 +74,7 @@ jobs:
|
||||
|
||||
- name: Verify frontend
|
||||
run: |
|
||||
if curl -sf http://127.0.0.1:3001 > /dev/null 2>&1; then
|
||||
if docker compose --env-file .env.production -f compose.prod.yml ps frontend --status running | grep -q frontend; then
|
||||
echo "✅ Frontend is accessible!"
|
||||
else
|
||||
echo "❌ Frontend is not accessible"
|
||||
|
||||
Reference in New Issue
Block a user