Imprroves postgresql’s readiness-check-command.

master
Luka Vandervelden 4 years ago
parent f2507e2dd0
commit ef7521c5b6

@ -2,7 +2,7 @@ name: postgresql
user: postgres
command: postgres -D ${SERVICE_ROOT}/db -k /tmp/postgresql-${ENVIRONMENT}
#stop-command: kill -HUP ${PID}
readiness-check-command: pg_isready -p ${POSTGRESQL_PORT}
readiness-check-command: pg_isready -p ${PORT_POSTGRESQL} -h localhost -q
environment-variables:
- PGROOT=${SERVICE_ROOT}
provides: postgresql

@ -359,7 +359,10 @@ class Service
now = Time.local
while (now - start_time).seconds < 5
r = Process.run "sh", ["-c", command]
r = Process.run "sh", ["-c", command],
output: Process::Redirect::Inherit,
error: Process::Redirect::Inherit,
env: commands_environment
if r.success?
break

Loading…
Cancel
Save