File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77set -ex
88
99DOCKER_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && cd .. && pwd ) "
10+ PSQL_CONNECTION=" postgresql://${POSTGRES_USER} :${POSTGRES_PASSWORD} @${POSTGRES_HOST} :${POSTGRES_PORT} "
1011
1112echo " [II] CREATE DATABASE"
12- psql " postgresql://postgres:postgres@$POSTGRES_HOST :$POSTGRES_PORT /postgres" \
13- < ${DOCKER_DIR} /sql/database.sql
13+ psql " ${PSQL_CONNECTION} /postgres" < ${DOCKER_DIR} /sql/database.sql
1414
1515echo " [II] LOAD EPIGRAPHHUB DUMP"
16- psql " postgresql://postgres:postgres@$POSTGRES_HOST :$POSTGRES_PORT /$POSTGRES_DB " \
17- < ${DOCKER_DIR} /sql/epigraphhub.sql
16+ psql " ${PSQL_CONNECTION} /${POSTGRES_DB} " < ${DOCKER_DIR} /sql/epigraphhub.sql
1817
1918echo " [II] LOAD PRIVATE DUMP"
20- psql " postgresql://postgres:postgres@$POSTGRES_HOST :$POSTGRES_PORT /$POSTGRES_DB_PRIVATE " \
21- < ${DOCKER_DIR} /sql/privatehub.sql
19+ psql " ${PSQL_CONNECTION} /$POSTGRES_DB_PRIVATE " < ${DOCKER_DIR} /sql/privatehub.sql
You can’t perform that action at this time.
0 commit comments