diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/docker/src/main/docker/pdpd-entrypoint.sh | 8 | ||||
-rw-r--r-- | packages/install/src/files/base.conf | 1 |
2 files changed, 7 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 } diff --git a/packages/install/src/files/base.conf b/packages/install/src/files/base.conf index d6b38d10..bf9b72ea 100644 --- a/packages/install/src/files/base.conf +++ b/packages/install/src/files/base.conf @@ -72,6 +72,7 @@ REPOSITORY_OFFLINE= SQL_HOST= SQL_USER= SQL_PASSWORD= +SQL_PORT=3306 # AAF |