summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2021-08-12 15:33:32 +0000
committerGerrit Code Review <gerrit@onap.org>2021-08-12 15:33:32 +0000
commit85b21b7f23ba8b4930a5f221ba1b35310afdbea8 (patch)
tree40bfb6294b59c0e8c2fd7c5a9a7fa4b0d7de8e2e /packages
parent1c200701f248240aac226208d048c420fedd9c35 (diff)
parentc34da31922d20ae675a5de6bc5c251598ae71ff5 (diff)
Merge "Add SQL_PORT configuration"
Diffstat (limited to 'packages')
-rw-r--r--packages/docker/src/main/docker/pdpd-entrypoint.sh8
-rw-r--r--packages/install/src/files/base.conf1
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