diff --git a/postgres/docker-healthcheck b/postgres/docker-healthcheck index eae1a94..9621824 100755 --- a/postgres/docker-healthcheck +++ b/postgres/docker-healthcheck @@ -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 )