Build isolated upgrade URL from runtime config
This commit is contained in:
@@ -76,11 +76,17 @@ fi
|
||||
docker exec -e TARGET_DB="$TARGET_DB" "$CONTAINER" sh -c '
|
||||
target_url="$(python -c '"'"'
|
||||
import os
|
||||
from sqlalchemy.engine import make_url
|
||||
from sqlalchemy import URL
|
||||
|
||||
print(
|
||||
make_url(os.environ["DATABASE_URL"])
|
||||
.set(database=os.environ["TARGET_DB"])
|
||||
URL.create(
|
||||
"postgresql+psycopg",
|
||||
username=os.environ["GEOINTEL_POSTGRES_USER"],
|
||||
password=os.environ["GEOINTEL_POSTGRES_PASSWORD"],
|
||||
host="127.0.0.1",
|
||||
port=5432,
|
||||
database=os.environ["TARGET_DB"],
|
||||
)
|
||||
.render_as_string(hide_password=False)
|
||||
)
|
||||
'"'"')"
|
||||
|
||||
Reference in New Issue
Block a user