diff --git a/dev/deploy-to-container/cli.js b/dev/deploy-to-container/cli.js index 15347a2a7..406bfb383 100644 --- a/dev/deploy-to-container/cli.js +++ b/dev/deploy-to-container/cli.js @@ -247,7 +247,8 @@ async function main () { Env: [ `LETSENCRYPT_HOST=${hostname}`, `VIRTUAL_HOST=${hostname}`, - `VIRTUAL_PORT=8000` + `VIRTUAL_PORT=8000`, + `PGHOST=dt-db-${branch}` ], Labels: { appversion: `${argv.appversion}` ?? '0.0.0', diff --git a/dev/deploy-to-container/start.sh b/dev/deploy-to-container/start.sh index 9c974dea8..992918136 100644 --- a/dev/deploy-to-container/start.sh +++ b/dev/deploy-to-container/start.sh @@ -22,8 +22,10 @@ echo "Creating data directories..." chmod +x ./app-create-dirs.sh ./app-create-dirs.sh -echo "Altering PG search path..." -psql -U django -h db -d ietf -v ON_ERROR_STOP=1 -c '\x' -c 'ALTER USER django set search_path=ietf_utf8,django,public;' +if [ -n "$PGHOST" ]; then + echo "Altering PG search path..." + psql -U django -h $PGHOST -d ietf -v ON_ERROR_STOP=1 -c '\x' -c 'ALTER USER django set search_path=ietf_utf8,django,public;' +fi echo "Running Datatracker checks..." ./ietf/manage.py check