Wait for application readiness in deployment
Test and deploy / test-and-deploy (push) Successful in 55s

This commit is contained in:
2026-07-31 06:27:09 -04:00
parent 19fc1e4dcb
commit e51bfd3dca
+13 -5
View File
@@ -44,9 +44,17 @@ jobs:
- name: Verify the running container
run: |
cd "$CI_WORKDIR"
docker compose \
--project-name roast_command_center \
--env-file /run/roast-production.env \
-f docker-compose.yml \
exec -T app node -e "fetch('http://127.0.0.1:8090/').then((response) => process.exit(response.ok ? 0 : 1))"
for attempt in {1..15}; do
if docker compose \
--project-name roast_command_center \
--env-file /run/roast-production.env \
-f docker-compose.yml \
exec -T app node -e "fetch('http://127.0.0.1:8090/').then((response) => process.exit(response.ok ? 0 : 1))"; then
break
fi
if [ "$attempt" -eq 15 ]; then
exit 1
fi
sleep 2
done
curl --fail --retry 10 --retry-delay 2 https://roast.srmr.xyz/