From 8e90f8ec886ba55e897f5d75fb6984e604870d9b Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 May 2020 17:28:53 +0100 Subject: [PATCH] Use `$POSTGRES_USER` environment variable --- wait-for-postgres.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wait-for-postgres.sh b/wait-for-postgres.sh index c2b4454..00b0133 100755 --- a/wait-for-postgres.sh +++ b/wait-for-postgres.sh @@ -7,7 +7,7 @@ host="$1" shift cmd="$@" -until PGPASSWORD=$POSTGRES_PASSWORD psql -h "$host" -U "postgres" -c '\q'; do +until PGUSER=$POSTGRES_USER PGPASSWORD=$POSTGRES_PASSWORD psql -h "$host" -c '\q'; do >&2 echo "Postgres is unavailable - sleeping" sleep 1 done