deploy: change health check
This commit is contained in:
@@ -58,14 +58,21 @@ jobs:
|
|||||||
echo "==> Build et démarrage du frontend"
|
echo "==> Build et démarrage du frontend"
|
||||||
docker compose up -d --build
|
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é"
|
echo "==> Vérification santé"
|
||||||
for i in $(seq 1 24); do
|
for i in $(seq 1 12); do
|
||||||
if curl -sf http://localhost:4000 | grep -q "html"; then
|
if curl -sf http://localhost:4000 | grep -q "html"; then
|
||||||
echo "Déploiement OK"
|
echo "Déploiement OK"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo " Attente... ($i/24)"
|
echo " Attente... ($i/12)"
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
echo "Échec : le frontend ne répond pas après 120s"
|
echo "Échec : le frontend ne répond pas après 60s"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user