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