We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d62d1ab commit 53f63ccCopy full SHA for 53f63cc
1 file changed
.github/workflows/cd.yml
@@ -59,14 +59,20 @@ jobs:
59
docker compose -f docker-compose-prod.yml up -d spring-$TARGET
60
61
echo "⏳ Waiting for health check on $PORT..."
62
+ HEALTHY=false
63
for i in {1..20}; do
64
if curl -sf http://localhost:$PORT/actuator/health > /dev/null; then
- echo "✅ spring-$TARGET is healthy"
65
- exit 0
+ HEALTHY=true
66
+ break
67
fi
68
echo "⏳ still waiting..."
69
sleep 5
70
done
71
+
72
+ if [ "$HEALTHY" = "true" ]; then
73
+ echo "✅ spring-$TARGET is healthy"
74
+ exit 0
75
+ fi
76
77
echo "❌ Health check failed for spring-$TARGET - rolling back"
78
docker compose -f docker-compose-prod.yml stop spring-$TARGET
0 commit comments