Use pg_ctl for readiness check
Using `pg_ctl status` is more reliable than relying checking an open port via netcat.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# wait for postgresql to listen
|
||||
while ! nc -z localhost 64444; do sleep 1; done
|
||||
# wait for postgresql to be up
|
||||
while ! pg_ctl -D $(pwd)/.hydra-data/postgres status; do sleep 1; done
|
||||
|
||||
createdb -h $(pwd)/.hydra-data/postgres -p 64444 hydra
|
||||
|
||||
|
Reference in New Issue
Block a user