From 310d5abb8bb4aaf28424f571d539c768018de9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Fri, 15 May 2026 21:51:13 +0400 Subject: [PATCH] deploy: change health check strategy --- .gitea/workflows/deploy-beta.yaml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/deploy-beta.yaml b/.gitea/workflows/deploy-beta.yaml index 966bd76..56a0d3f 100644 --- a/.gitea/workflows/deploy-beta.yaml +++ b/.gitea/workflows/deploy-beta.yaml @@ -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"