deploy
All checks were successful
Build & Deploy KLZ Cables / build-and-deploy (push) Successful in 4m2s

This commit is contained in:
2026-01-29 14:47:43 +01:00
parent 658057cdb1
commit 7b6f4b5ea4
2 changed files with 8 additions and 23 deletions

View File

@@ -105,23 +105,14 @@ jobs:
echo "🚀 Starting containers..."
docker-compose up -d
echo "⏳ Waiting for health check..."
MAX_RETRIES=12
RETRY_COUNT=0
while [ \$RETRY_COUNT -lt \$MAX_RETRIES ]; do
STATUS=\$(docker-compose ps --format "{{.Health}}" 2>/dev/null || docker-compose ps | grep klz-cablescom_app_1 | awk '{print \$NF}')
if echo "\$STATUS" | grep -q "healthy"; then
echo "✅ Service is healthy!"
break
fi
echo " • Waiting... (\$((RETRY_COUNT + 1))/\$MAX_RETRIES) Status: \$STATUS"
sleep 10
RETRY_COUNT=\$((RETRY_COUNT + 1))
done
if [ \$RETRY_COUNT -eq \$MAX_RETRIES ]; then
echo "❌ Health check failed"
docker-compose ps
echo "⏳ Giving the app a few seconds to warm up..."
sleep 10
echo "🔍 Checking container status..."
docker-compose ps
if ! docker-compose ps | grep -q "Up"; then
echo "❌ Container failed to start"
docker-compose logs --tail=100
exit 1
fi