deploy: change health check strategy
This commit is contained in:
@@ -58,20 +58,14 @@ jobs:
|
||||
echo "==> Build et démarrage du frontend"
|
||||
docker compose up -d --build
|
||||
|
||||
echo "==> État des conteneurs"
|
||||
docker compose ps
|
||||
|
||||
echo "==> Logs frontend (30s)"
|
||||
sleep 30
|
||||
docker compose logs --tail=50 frontend
|
||||
|
||||
echo "==> Vérification santé"
|
||||
for i in $(seq 1 12); do
|
||||
if curl -sf http://localhost:4000 | grep -q "html"; then
|
||||
echo "Déploiement OK"
|
||||
status=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:4000)
|
||||
if echo "$status" | grep -qE "^[23]"; then
|
||||
echo "Déploiement OK (HTTP $status)"
|
||||
exit 0
|
||||
fi
|
||||
echo " Attente... ($i/12)"
|
||||
echo " Attente... ($i/12) [HTTP $status]"
|
||||
sleep 5
|
||||
done
|
||||
echo "Échec : le frontend ne répond pas après 60s"
|
||||
|
||||
Reference in New Issue
Block a user