Test the specified POSTGRES_DB

This commit is contained in:
Teoh Han Hui 2017-03-30 20:36:58 +08:00 committed by GitHub
parent 303307e15d
commit f5baa3e974
1 changed files with 2 additions and 0 deletions

View File

@ -3,12 +3,14 @@ set -eo pipefail
host="$(hostname --ip-address || echo '127.0.0.1')"
user="${POSTGRES_USER:-postgres}"
db="${POSTGRES_DB:-$POSTGRES_USER}"
export PGPASSWORD="${POSTGRES_PASSWORD:-}"
args=(
# force postgres to not use the local unix socket (test "external" connectibility)
--host "$host"
--username "$user"
--dbname "$db"
--quiet --no-align --tuples-only
)