File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ LABEL org.label-schema.maintainer="Voxpupuli Release Team <voxpupuli@groups.io>"
1616 org.label-schema.build-date="$build_date"
1717
1818# Use netcat-openbsd to support IPv6 connectivity checks (netcat-traditional is IPv4 only)
19- ARG PACKAGES="ca-certificates curl dnsutils netcat-openbsd dumb-init"
19+ ARG PACKAGES="ca-certificates curl dnsutils netcat-openbsd dumb-init postgresql-client-16 postgresql-client-common "
2020
2121ARG LOGDIR
2222ENV LOGDIR=${LOGDIR:-/opt/puppetlabs/server/data/puppetdb/logs}
Original file line number Diff line number Diff line change 1616# OPENVOXDB_POSTGRES_HOSTNAME Specified in Dockerfile, defaults to postgres
1717# OPENVOXSERVER_HOSTNAME DNS name of puppetserver to wait on, defaults to puppet
1818
19-
2019msg () {
2120 echo " ($0 ) $1 "
2221}
@@ -57,12 +56,11 @@ OPENVOXDB_POSTGRES_HOSTNAME="${OPENVOXDB_POSTGRES_HOSTNAME:-postgres}"
5756OPENVOXSERVER_HOSTNAME=" ${OPENVOXSERVER_HOSTNAME:- puppet} "
5857OPENVOXSERVER_PORT=" ${OPENVOXSERVER_PORT:- 8140} "
5958
60- # wait for postgres DNS
61- wait_for_host_name_resolution $ OPENVOXDB_POSTGRES_HOSTNAME $OPENVOXDB_WAITFORHOST_SECONDS
59+ # wait for postgres is ready
60+ /wtfc.sh --timeout= " ${OPENVOXDB_WAITFORHOST_SECONDS} " --interval=1 --progress " pg_isready -h ${ OPENVOXDB_POSTGRES_HOSTNAME} --port ' ${OPENVOXDB_POSTGRES_PORT :- 5432} ' "
6261
6362# wait for puppetserver DNS, then healthcheck
6463if [ " $USE_OPENVOXSERVER " = true ]; then
65- wait_for_host_name_resolution $OPENVOXSERVER_HOSTNAME $OPENVOXDB_WAITFORHOST_SECONDS
6664 HEALTH_COMMAND=" curl --silent --fail --insecure 'https://${OPENVOXSERVER_HOSTNAME} :" ${OPENVOXSERVER_PORT} " /status/v1/simple' | grep -q '^running$'"
6765fi
6866
@@ -72,6 +70,3 @@ if [ -n "$HEALTH_COMMAND" ]; then
7270 error " Required health check failed"
7371 fi
7472fi
75-
76- # wait for postgres
77- wait_for_host_port $OPENVOXDB_POSTGRES_HOSTNAME " ${OPENVOXDB_POSTGRES_PORT:- 5432} " $OPENVOXDB_WAITFORPOSTGRES_SECONDS
You can’t perform that action at this time.
0 commit comments