From d140a47f236ef5ca04aa23935ef6f410bd169f9e Mon Sep 17 00:00:00 2001 From: root Date: Sat, 5 Sep 2026 14:41:45 +0000 Subject: [PATCH] fix(deploy): reconcile existing postgres role password --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 8141b3f..7f6ce83 100755 --- a/install.sh +++ b/install.sh @@ -377,6 +377,12 @@ wait_for_compose_health() { } docker compose --env-file "$ENV_FILE" -f "$E_COMPOSE" -p "$E_PROJECT" up -d postgres valkey +# A previous interrupted install may have initialized the volume with a +# different generated role password. Reconcile it through the local Postgres +# socket before running migrations; no data is dropped. +docker compose --env-file "$ENV_FILE" -f "$E_COMPOSE" -p "$E_PROJECT" exec -T postgres \ + psql -U postgres -d postgres -v ON_ERROR_STOP=1 \ + -c "ALTER ROLE product_e WITH PASSWORD '$E_POSTGRES_PASSWORD';" >/dev/null docker compose --env-file "$ENV_FILE" -f "$E_COMPOSE" -p "$E_PROJECT" run --rm --no-deps e-server migrate -config /etc/overcooked-e/config.yaml docker compose --env-file "$ENV_FILE" -f "$S_COMPOSE" -p "$S_PROJECT" up -d postgres valkey docker compose --env-file "$ENV_FILE" -f "$S_COMPOSE" -p "$S_PROJECT" run --rm --no-deps s-migrate