Skip to content

Commit

Permalink
#271 use pg_isready to check PG DB status
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Aug 31, 2019
1 parent 4a7dbca commit 2a36865
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/scripts/configure.sh
Expand Up @@ -41,9 +41,9 @@ case ${DB_TYPE} in
export PGPASSWORD=${DB_PASSWD}

# We need to wait until PG Container available
echo "Check if Postgres is available..."
until psql -h "${DB_HOST}" -U "${DB_USER}" -c '\l'; do
echo "Postgres is unavailable - sleeping"
echo "Check if Postgres is avail/ready..."
until pg_isready -h "${DB_HOST}"; do
echo "Exit code=$? - Postgres not ready - sleeping"
sleep 1
done

Expand Down

0 comments on commit 2a36865

Please sign in to comment.