From bf2b8296e9fbff7ca90ffda2c33c50ca8b48de27 Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Tue, 28 Dec 2021 19:23:31 +0100 Subject: [PATCH] Make entrypoint.sh respect FINERACT_DEFAULT_TENANTDB* (fixes FINERACT-1454) --- entrypoint.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index de1093222..320ed3b6e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,14 +18,16 @@ # under the License. # +# NOTE that we are limited to busybox's sh, and cannot use bash here, because +# this is used in a container image based on azul/zulu-openjdk-alpine:17. -set -e +# see e.g. https://explainshell.com/explain?cmd=set+-eux +set -ex -while ! nc -zvw3 fineractmysql 3306 ; do +while ! nc -zvw3 "${FINERACT_DEFAULT_TENANTDB_HOSTNAME:-fineractmysql}" "${FINERACT_DEFAULT_TENANTDB_PORT:-3306}" ; do >&2 echo "DB Server is unavailable - sleeping" sleep 5 done >&2 echo "DB Server is up - executing command" java -cp "app:app/lib/*" org.apache.fineract.ServerApplication -