fix: wait for healthy deployment services
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-10 02:09:25 -04:00
parent 0cd1b9ff2c
commit e069dcaa40
4 changed files with 20 additions and 8 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ compose_args='-f compose.production.yaml'
export IMAGE_TAG="$RELEASE_TAG"
docker compose $compose_args build api worker web
docker compose $compose_args up -d postgres redis
docker compose $compose_args up -d --wait postgres redis
docker compose $compose_args run --rm api npm run db:migrate
docker compose $compose_args up -d api worker web
docker compose $compose_args up -d --wait api worker web
docker compose $compose_args ps
./scripts/smoke-production.sh
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
set -eu
deploy_script=$(cat scripts/deploy-production.sh)
rollback_script=$(cat scripts/rollback-production.sh)
printf '%s\n' "$deploy_script" | grep -F 'up -d --wait postgres redis' >/dev/null
printf '%s\n' "$deploy_script" | grep -F 'up -d --wait api worker web' >/dev/null
printf '%s\n' "$rollback_script" | grep -F 'up -d --wait api worker web' >/dev/null
printf '%s\n' 'deployment health wait tests passed'
+1 -1
View File
@@ -4,6 +4,6 @@ set -eu
: "${RELEASE_TAG:?Set RELEASE_TAG to the previously deployed immutable image tag}"
export IMAGE_TAG="$RELEASE_TAG"
docker compose -f compose.production.yaml up -d api worker web
docker compose -f compose.production.yaml up -d --wait api worker web
docker compose -f compose.production.yaml ps
./scripts/smoke-production.sh