fix(deploy): skip bundled postgres for external databases
CI / Rust Checks (push) Successful in 12m39s
CI / UI Checks (push) Successful in 5s
CI / Community Image Smoke (push) Successful in 1m11s
CI / Frontend E2E (push) Successful in 4m53s
CI / Deploy (push) Failing after 46s

This commit is contained in:
2026-08-31 23:33:48 +03:00
parent 343bb99bff
commit 5818255cf5
3 changed files with 26 additions and 3 deletions
+16 -2
View File
@@ -26,6 +26,10 @@ compose_profiles=""
if [ "$cache_backend" = "valkey" ] || [ "$cache_backend" = "redis" ]; then
compose_profiles="--profile cache"
fi
postgres_scale=""
if [ "$(env_value POSTGRES_HOST postgres)" != "postgres" ]; then
postgres_scale="--scale postgres=0"
fi
compose() {
# Intentional word splitting: compose_profiles is either empty or two arguments.
@@ -33,6 +37,12 @@ compose() {
docker compose $compose_profiles "$@"
}
compose_up() {
# Intentional word splitting: postgres_scale is either empty or two arguments.
# shellcheck disable=SC2086
compose up -d --remove-orphans $postgres_scale
}
wait_for_stack() {
readiness_path="$1"
attempt=1
@@ -119,7 +129,11 @@ rollback() {
if [ "$cache_backend" = "valkey" ] || [ "$cache_backend" = "redis" ]; then
compose_profiles="--profile cache"
fi
compose up -d --remove-orphans
postgres_scale=""
if [ "$(env_value POSTGRES_HOST postgres)" != "postgres" ]; then
postgres_scale="--scale postgres=0"
fi
compose_up
wait_for_stack health
}
@@ -127,7 +141,7 @@ compose config -q
create_backup
compose pull
if ! compose up -d --remove-orphans || ! wait_for_stack ready; then
if ! compose_up || ! wait_for_stack ready; then
compose ps >&2 || true
rollback
exit 1