Compare commits

...

2 Commits

Author SHA1 Message Date
cedric 55bf77ca0e deploy: use node for healthcheck
Déploiement Frontend BETA / Lint et tests (push) Successful in 2m2s
Déploiement Frontend BETA / Déploiement beta (push) Successful in 1m29s
2026-05-15 22:15:47 +04:00
cedric 66d8ed1e00 deploy: use docker healthcheck 2026-05-15 21:59:06 +04:00
2 changed files with 8 additions and 14 deletions
+2 -14
View File
@@ -56,17 +56,5 @@ jobs:
|| docker network create konstitisyon_network
echo "==> Build et démarrage du frontend"
docker compose up -d --build
echo "==> Vérification santé"
for i in $(seq 1 12); do
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) [HTTP $status]"
sleep 5
done
echo "Échec : le frontend ne répond pas après 60s"
exit 1
docker compose up -d --build --wait
echo "Déploiement OK"
+6
View File
@@ -11,6 +11,12 @@ services:
- "4000:4000"
env_file: .env
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "node -e \"require('http').get('http://localhost:4000',r=>process.exit(r.statusCode<400?0:1)).on('error',()=>process.exit(1))\""]
interval: 10s
timeout: 5s
retries: 12
start_period: 30s
networks:
- konstitisyon_network
networks: