From 1bcb8d0be9d94c963821d5f947cbaa8c26d9cab7 Mon Sep 17 00:00:00 2001 From: Tobias Pflug Date: Thu, 14 May 2020 15:24:32 +0200 Subject: [PATCH] Use `pg_isready` for readiness check Co-authored-by: Graham Christensen --- scripts/start-hydra.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/start-hydra.sh b/scripts/start-hydra.sh index 4898a1f3..3b9c7dfd 100755 --- a/scripts/start-hydra.sh +++ b/scripts/start-hydra.sh @@ -1,7 +1,7 @@ #!/bin/sh -# wait for postgresql to be up -while ! pg_ctl -D $(pwd)/.hydra-data/postgres status; do sleep 1; done +# wait for postgresql to listen +while ! pg_isready -h $(pwd)/.hydra-data/postgres -p 64444; do sleep 1; done createdb -h $(pwd)/.hydra-data/postgres -p 64444 hydra