Use custom ports for postgres/hydra

Use custom ports so hydra and postgres can run in environments where
the default ports are in use already.
This commit is contained in:
Tobias Pflug 2020-05-14 11:49:29 +02:00
parent eb06a435ab
commit 07a4465260
6 changed files with 14 additions and 11 deletions

View file

@ -300,7 +300,7 @@
export HYDRA_HOME="src/"
mkdir -p .hydra-data
export HYDRA_DATA="$(pwd)/.hydra-data"
export HYDRA_DBI='dbi:Pg:dbname=hydra;host=localhost;'
export HYDRA_DBI='dbi:Pg:dbname=hydra;host=localhost;port=64444'
'';
});

View file

@ -9,7 +9,7 @@ mkShell {
export HYDRA_HOME="src/"
mkdir -p .hydra-data
export HYDRA_DATA="$(pwd)/.hydra-data"
export HYDRA_DBI='dbi:Pg:dbname=hydra;host=localhost;'
export HYDRA_DBI='dbi:Pg:dbname=hydra;host=localhost;port=64444'
exec foreman start
'';

View file

@ -1,6 +1,7 @@
#!/bin/sh
# wait for hydra-server to listen
while ! nc -z localhost 3000; do sleep 1; done
while ! nc -z localhost 63333; do sleep 1; done
exec hydra-evaluator
touch .hydra-data/hydra.conf
HYDRA_CONFIG=$(pwd)/.hydra-data/hydra.conf exec hydra-evaluator

View file

@ -1,11 +1,12 @@
#!/bin/sh
# wait for postgresql to listen
while ! nc -z localhost 5432; do sleep 1; done
while ! nc -z localhost 64444; do sleep 1; done
createdb -h $(pwd)/.hydra-data/postgres hydra
createdb -h $(pwd)/.hydra-data/postgres -p 64444 hydra
hydra-init
hydra-create-user alice --password foobar --role admin
exec hydra-server
touch .hydra-data/hydra.conf
HYDRA_CONFIG=$(pwd)/.hydra-data/hydra.conf exec hydra-server --port 63333

View file

@ -1,4 +1,4 @@
#!/bin/sh
initdb ./.hydra-data/postgres
exec postgres -D ./.hydra-data/postgres -k $(pwd)/.hydra-data/postgres
exec postgres -D ./.hydra-data/postgres -k $(pwd)/.hydra-data/postgres -p 64444

View file

@ -1,6 +1,7 @@
#!/bin/sh
# wait until hydra is listening on port 3000
while ! nc -z localhost 3000; do sleep 1; done
# wait until hydra is listening on port 63333
while ! nc -z localhost 63333; do sleep 1; done
hydra-queue-runner
touch .hydra-data/hydra.conf
HYDRA_CONFIG=$(pwd)/.hydra-data/hydra.conf exec hydra-queue-runner