Fix local server for multiple applications
[anna.git] / example / diameter / launcher / resources / rest_api / ct / ct.sh
index fc69e8f..ac28e53 100755 (executable)
@@ -12,7 +12,8 @@ ENDPOINT=http://localhost:8074
 PORT=$(echo ${ENDPOINT} | cut -d: -f3)
 SVC_NAME=anna-adml-http
 # Entrypoint arguments (ft/st):
-EXTRA_ARGUMENTS= # default is ft (function test: debug traces and traffic logs)
+ADML_ARGUMENTS="--services services.xml --cntDir counters --tmDir tm --cntRecordPeriod 60000 --logStatisticSamples none --reconnectionPeriod 10000 --httpServer 0.0.0.0:8000"
+#ADML_ARGUMENTS+=" --trace debug"
 
 VARIANT=${1:-Release}
 
@@ -33,9 +34,9 @@ nghttp --version 2>/dev/null
 echo "Requirement found !"
 
 echo
-echo "Rebuild ADML HTTP service image (y/n) [y]:"
+echo "Rebuild ADML HTTP service image (y/n) [n]:"
 read opt
-[ -z "${opt}" ] && opt=y
+[ -z "${opt}" ] && opt=n
 if [ "${opt}" = "y" ]
 then
   ${REPO_DIR}/tools/build-anna-adml-http ${VARIANT}
@@ -52,12 +53,7 @@ then
   docker kill ${SVC_NAME} &>/dev/null
   docker kill ${SVC_NAME}-debug &>/dev/null
 
-  echo "Optimize for system test (disable traffic logs and set warning level for traces) (y/n) [n]:"
-  read opt
-  [ -z "${opt}" ] && opt=n
-  [ "${opt}" = "y" ] && EXTRA_ARGUMENTS=st
-
-  cid=$(docker run --rm -d -p ${PORT}:${PORT} --name ${cname} anna-adml-http:${version} ${EXTRA_ARGUMENTS} >/dev/null)
+  cid=$(docker run --rm -d -p ${PORT}:${PORT} --name ${cname} anna-adml-http:${version} ${ADML_ARGUMENTS} >/dev/null)
   [ $? -ne 0 ] && exit 1
   echo "Container id: ${cid} (deployed as '${cname}')"
 fi