From 425287452a1a6a0130b0705d0cc8205b2a6c9032 Mon Sep 17 00:00:00 2001 From: Stephen Salinas Date: Wed, 22 Jun 2016 09:07:36 -0400 Subject: [PATCH] fix docker compose yaml to get hostname properly --- BaragonService/src/main/docker/start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BaragonService/src/main/docker/start.sh b/BaragonService/src/main/docker/start.sh index da6dc5b9a..e856f98f9 100755 --- a/BaragonService/src/main/docker/start.sh +++ b/BaragonService/src/main/docker/start.sh @@ -2,16 +2,17 @@ if [ ${DOCKER_HOST} ]; then HOST_AND_PORT=`echo $DOCKER_HOST | awk -F/ '{print $3}'` - HOST_IP="${HOST_AND_PORT%:*}" + BARAGON_HOSTNAME="${BARAGON_HOSTNAME:=HOST_AND_PORT%:*}" fi -DEFAULT_URI_BASE="http://${HOST_IP:=localhost}:${BARAGON_PORT:=8080}${BARAGON_UI_BASE:=/baragon/v2}" +DEFAULT_URI_BASE="http://${BARAGON_HOSTNAME:=localhost}:${BARAGON_PORT:=8080}${BARAGON_UI_BASE:=/baragon/v2}" [[ ! ${BARAGON_ZK_NAMESPACE:-} ]] || args+=( -Ddw.zookeeper.zkNamespace="$BARAGON_ZK_NAMESPACE" ) [[ ! ${BARAGON_ZK_QUORUM:-} ]] || args+=( -Ddw.zookeeper.quorum="$BARAGON_ZK_QUORUM" ) [[ ! ${BARAGON_PORT:-} ]] || args+=( -Ddw.server.connector.port="$BARAGON_PORT" ) [[ ! ${BARAGON_AUTH_ENABLED:-} ]] || args+=( -Ddw.auth.enabled="$BARAGON_AUTH_ENABLED" ) [[ ! ${BARAGON_AUTH_KEY:-} ]] || args+=( -Ddw.auth.key="$BARAGON_AUTH_KEY" ) +[[ ! ${BARAGON_HOSTNAME:-} ]] || args+=( -Ddw.hostname="$BARAGON_HOSTNAME" ) args+=( -Ddw.ui.baseUrl="${BARAGON_UI_BASE_URL:=$DEFAULT_URI_BASE}" )