Add using of PGPASSWORD for psql

Given example is not complete at least for official postgres image. I have added setting of psql password over POSTGRES_PASSWORD env variable.
This commit is contained in:
Kanan Rahimov 2018-03-20 21:51:52 +03:00 committed by Joao Fernandes
parent 198045658c
commit e01ab90c07
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ script:
shift
cmd="$@"
until psql -h "$host" -U "postgres" -c '\q'; do
until PGPASSWORD=$POSTGRES_PASSWORD psql -h "$host" -U "postgres" -c '\q'; do
>&2 echo "Postgres is unavailable - sleeping"
sleep 1
done