Use pg_isready for readiness check

Co-authored-by: Graham Christensen <graham@grahamc.com>
This commit is contained in:
Tobias Pflug 2020-05-14 15:24:32 +02:00
parent d9d58b7055
commit 1bcb8d0be9

View file

@ -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