Skip to content
Permalink
Browse files

#271 use pg_isready to check PG DB status

  • Loading branch information...
justb4 committed Aug 31, 2019
1 parent 4a7dbca commit 2a36865f3f59fd42ef6ae73cd62f4fe1ceb0980b
Showing with 3 additions and 3 deletions.
  1. +3 −3 docker/scripts/configure.sh
@@ -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

0 comments on commit 2a36865

Please sign in to comment.
You can’t perform that action at this time.