From 44ae5246264d5c50c6c2d8160dcd09a8fbab1068 Mon Sep 17 00:00:00 2001 From: Youssef Date: Thu, 25 Jun 2026 09:47:54 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20ajout=20d'une=20v=C3=A9rification=20de=20?= =?UTF-8?q?d=C3=A9marrage=20apr=C3=A8s=20le=20d=C3=A9ploiement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-prod.yml | 17 +++++++++++++++++ .gitea/workflows/ci-test.yml | 17 ++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci-prod.yml b/.gitea/workflows/ci-prod.yml index 48032f5..6bd0798 100644 --- a/.gitea/workflows/ci-prod.yml +++ b/.gitea/workflows/ci-prod.yml @@ -58,3 +58,20 @@ jobs: echo "CAPTCHA_SITEKEY=${CAPTCHA_SITEKEY:-1x00000000000000000000AA}" >> .env docker compose down app || true docker compose up -d --build app + + - name: Verify application startup + run: | + echo "Waiting for application to start..." + COUNT=0 + while [ $COUNT -lt 30 ]; do + if docker exec astalange_app wget -qO- http://localhost:8080/login | grep -q "Connexion"; then + echo "Application is up and login page is accessible!" + exit 0 + fi + echo "Waiting... ($COUNT/30)" + sleep 5 + COUNT=$((COUNT+1)) + done + echo "Application failed to start or login page is not accessible." + docker logs astalange_app + exit 1 diff --git a/.gitea/workflows/ci-test.yml b/.gitea/workflows/ci-test.yml index 50a5ff5..2a3e84f 100644 --- a/.gitea/workflows/ci-test.yml +++ b/.gitea/workflows/ci-test.yml @@ -55,4 +55,19 @@ jobs: docker compose down app || true docker compose up -d --build app - + - name: Verify application startup + run: | + echo "Waiting for application to start..." + COUNT=0 + while [ $COUNT -lt 30 ]; do + if docker exec astalange_app wget -qO- http://localhost:8080/login | grep -q "Connexion"; then + echo "Application is up and login page is accessible!" + exit 0 + fi + echo "Waiting... ($COUNT/30)" + sleep 5 + COUNT=$((COUNT+1)) + done + echo "Application failed to start or login page is not accessible." + docker logs astalange_app + exit 1