Wait for application readiness in deployment
Test and deploy / test-and-deploy (push) Successful in 55s
Test and deploy / test-and-deploy (push) Successful in 55s
This commit is contained in:
@@ -44,9 +44,17 @@ jobs:
|
|||||||
- name: Verify the running container
|
- name: Verify the running container
|
||||||
run: |
|
run: |
|
||||||
cd "$CI_WORKDIR"
|
cd "$CI_WORKDIR"
|
||||||
docker compose \
|
for attempt in {1..15}; do
|
||||||
--project-name roast_command_center \
|
if docker compose \
|
||||||
--env-file /run/roast-production.env \
|
--project-name roast_command_center \
|
||||||
-f docker-compose.yml \
|
--env-file /run/roast-production.env \
|
||||||
exec -T app node -e "fetch('http://127.0.0.1:8090/').then((response) => process.exit(response.ok ? 0 : 1))"
|
-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/
|
curl --fail --retry 10 --retry-delay 2 https://roast.srmr.xyz/
|
||||||
|
|||||||
Reference in New Issue
Block a user