From d50a8934c1c8f254db9e9a0d16aa14628cf46c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sun, 25 Dec 2016 16:50:41 +0100 Subject: [PATCH] fix postgres check --- deployment/docker/c3nav.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/docker/c3nav.bash b/deployment/docker/c3nav.bash index 61ed82c4..dee49515 100644 --- a/deployment/docker/c3nav.bash +++ b/deployment/docker/c3nav.bash @@ -12,7 +12,7 @@ fi ls /data/map if [ "$1" == "webworker" ]; then - until psql -h "postgres" -U "c3nav" -c '\l'; do + while ! nc postgres 5432; do >&2 echo "Postgres is unavailable! waiting…" sleep 1 done @@ -39,7 +39,7 @@ if [ "$1" == "webworker" ]; then fi if [ "$1" == "taskworker" ]; then - until psql -h "postgres" -U "c3nav" -c '\l'; do + while ! nc postgres 5432; do >&2 echo "Postgres is unavailable! waiting…" sleep 1 done