wait-dbapi 211 B

12345678
  1. #!/usr/bin/env bash
  2. set -e
  3. # wait for api database to come up
  4. until PGPASSWORD=$DESECSTACK_DBAPI_PASSWORD_desec psql -h dbapi -U desec -c '\q'; do
  5. >&2 echo "Postgres is unavailable - sleeping"
  6. sleep 1
  7. done