Skip to content

Commit

Permalink
Add using of PGPASSWORD for psql
Browse files Browse the repository at this point in the history
Given example is not complete at least for official postgres image. I have added setting of psql password over POSTGRES_PASSWORD env variable.
  • Loading branch information
KenanBek authored and joaofnfernandes committed Mar 27, 2018
1 parent 1980456 commit e01ab90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compose/startup-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e01ab90

Please sign in to comment.