fix(deploy): reconcile existing postgres role password
This commit is contained in:
1 parent
22366380c6
commit
d140a47f23
1 file changed
+6
@@ -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
|
||||
|
||||
Reference in new issue
Block a user