hydra/scripts/start-hydra.sh
Tobias Pflug d9d58b7055 Use pg_ctl for readiness check
Using `pg_ctl status` is more reliable than relying checking an
open port via netcat.
2020-05-15 12:37:16 +02:00

13 lines
340 B
Bash
Executable file

#!/bin/sh
# 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
hydra-init
hydra-create-user alice --password foobar --role admin
touch .hydra-data/hydra.conf
HYDRA_CONFIG=$(pwd)/.hydra-data/hydra.conf exec hydra-server --port 63333