fix(deploy): distinguish core migration drift
CI / Rust Checks (push) Successful in 12m35s
CI / UI Checks (push) Successful in 6s
CI / Community Image Smoke (push) Successful in 6m14s
CI / Frontend E2E (push) Successful in 7m6s
CI / Deploy (push) Failing after 40s

This commit is contained in:
2026-09-01 20:30:09 +03:00
parent 66b9bfd875
commit 527efb510f
3 changed files with 22 additions and 3 deletions
+6 -1
View File
@@ -49,13 +49,18 @@ postgres_port="$(env_value POSTGRES_PORT 5432)"
postgres_db="$(env_value POSTGRES_DB crank)"
postgres_user="$(env_value POSTGRES_USER crank)"
postgres_password="$(env_value POSTGRES_PASSWORD)"
docker run --rm \
-v "$backup_dir:/backup:ro" \
postgres:16-alpine \
pg_restore --list /backup/postgres.dump >/dev/null
docker run --rm --network host \
-e PGPASSWORD="$postgres_password" \
-v "$backup_dir:/backup:ro" \
postgres:16-alpine \
pg_restore --host "$postgres_host" --port "$postgres_port" \
--username "$postgres_user" --dbname "$postgres_db" \
--clean --if-exists --no-owner --no-privileges /backup/postgres.dump
--clean --if-exists --no-owner --no-privileges \
--single-transaction --exit-on-error /backup/postgres.dump
admin_container="$(compose ps -aq admin-api)"
storage_root="$(env_value CRANK_STORAGE_ROOT /var/lib/crank/storage)"