Imprroves postgresql’s readiness-check-command.
parent
f2507e2dd0
commit
ef7521c5b6
|
@ -2,7 +2,7 @@ name: postgresql
|
||||||
user: postgres
|
user: postgres
|
||||||
command: postgres -D ${SERVICE_ROOT}/db -k /tmp/postgresql-${ENVIRONMENT}
|
command: postgres -D ${SERVICE_ROOT}/db -k /tmp/postgresql-${ENVIRONMENT}
|
||||||
#stop-command: kill -HUP ${PID}
|
#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:
|
environment-variables:
|
||||||
- PGROOT=${SERVICE_ROOT}
|
- PGROOT=${SERVICE_ROOT}
|
||||||
provides: postgresql
|
provides: postgresql
|
||||||
|
|
|
@ -359,7 +359,10 @@ class Service
|
||||||
now = Time.local
|
now = Time.local
|
||||||
|
|
||||||
while (now - start_time).seconds < 5
|
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?
|
if r.success?
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue