From ea0cfaa99c85bd4a15e04fa00fc36172137c057c Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Tue, 12 May 2020 09:36:51 +0100 Subject: [PATCH] unified env variables for ecm/bpm hosts (#1465) --- docker/entrypoint.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 2c2f08024..ef8b11cba 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -59,10 +59,21 @@ if [ -n "${APP_CONFIG_OAUTH2_REDIRECT_LOGOUT}" ];then cat /tmp/app.config.json > ./app.config.json fi -if [[ $ACS_URL ]]; then +if [[ -n "${APP_CONFIG_BPM_HOST}" ]] +then replace="\/" - encoded=${ACS_URL//\//$replace} - sed -i s%{protocol}//{hostname}{:port}%"$encoded"%g /tmp/app.config.json && \ + encoded=${APP_CONFIG_BPM_HOST//\//$replace} + sed -e "s/\"bpmHost\": \".*\"/\"bpmHost\": \"${encoded}\"/g" \ + -i /tmp/app.config.json && \ + cat /tmp/app.config.json > ./app.config.json +fi + +if [[ -n "${APP_CONFIG_ECM_HOST}" ]] +then + replace="\/" + encoded=${APP_CONFIG_ECM_HOST//\//$replace} + sed -e "s/\"ecmHost\": \".*\"/\"ecmHost\": \"${encoded}\"/g" \ + -i /tmp/app.config.json && \ cat /tmp/app.config.json > ./app.config.json fi