update for image url
This commit is contained in:
15
wait-for-postgres.sh
Normal file
15
wait-for-postgres.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# wait-for-postgres.sh
|
||||
|
||||
set -e
|
||||
|
||||
host="$1"
|
||||
shift
|
||||
|
||||
until PGPASSWORD=$POSTGRES_PASS psql -h "$host" -U "postgres" -c '\q'; do
|
||||
>&2 echo "Postgres is unavailable - sleeping"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
>&2 echo "Postgres is up - executing command"
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user