aboutsummaryrefslogtreecommitdiffstats
path: root/packages/docker
diff options
context:
space:
mode:
Diffstat (limited to 'packages/docker')
-rw-r--r--packages/docker/src/main/docker/pdpd-entrypoint.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/docker/src/main/docker/pdpd-entrypoint.sh b/packages/docker/src/main/docker/pdpd-entrypoint.sh
index 8f801a45..112d3cb4 100644
--- a/packages/docker/src/main/docker/pdpd-entrypoint.sh
+++ b/packages/docker/src/main/docker/pdpd-entrypoint.sh
@@ -154,8 +154,12 @@ function db {
return 0
fi
- echo "Wating for ${SQL_HOST} ."
- timeout 120 sh -c 'until nc -vz "${SQL_HOST}" 3306; do echo -n "."; sleep 1; done'; echo $?
+ if [ -z "${SQL_PORT}" ]; then
+ export SQL_PORT=3306
+ fi
+
+ echo "Waiting for ${SQL_HOST}:${SQL_PORT} ..."
+ timeout 120 sh -c 'until nc -vz -w 20 "${SQL_HOST}" "${SQL_PORT}"; do echo -n "."; sleep 1; done'
"${POLICY_HOME}"/bin/db-migrator -s ALL -o upgrade
}