aboutsummaryrefslogtreecommitdiffstats
path: root/aai-traversal
diff options
context:
space:
mode:
Diffstat (limited to 'aai-traversal')
-rw-r--r--aai-traversal/src/main/resources/docker/docker-entrypoint.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/aai-traversal/src/main/resources/docker/docker-entrypoint.sh b/aai-traversal/src/main/resources/docker/docker-entrypoint.sh
index 52c6bfa..464683a 100644
--- a/aai-traversal/src/main/resources/docker/docker-entrypoint.sh
+++ b/aai-traversal/src/main/resources/docker/docker-entrypoint.sh
@@ -19,7 +19,7 @@
###
# Set the current path to be the application home and common libs home
-APP_HOME=$(pwd);
+export APP_HOME=$(pwd);
COMMONLIBS_HOME="/opt/app/commonLibs";
export CHEF_CONFIG_REPO=${CHEF_CONFIG_REPO:-aai-config};
@@ -27,6 +27,9 @@ export CHEF_GIT_URL=${CHEF_GIT_URL:-http://gerrit.onap.org/r/aai};
export CHEF_CONFIG_GIT_URL=${CHEF_CONFIG_GIT_URL:-$CHEF_GIT_URL};
export CHEF_DATA_GIT_URL=${CHEF_DATA_GIT_URL:-$CHEF_GIT_URL};
+export RESOURCES_HOSTNAME=${RESOURCES_HOSTNAME:-aai-resources.api.simpledemo.openecomp.org};
+export RESOURCES_PORT=${RESOURCES_PORT:-8447};
+
USER_ID=${LOCAL_USER_ID:-9001}
if [ $(cat /etc/passwd | grep aaiadmin | wc -l) -eq 0 ]; then
@@ -45,6 +48,21 @@ httpsPort=8446;
cd ${APP_HOME};
+# If the variable DISABLE_UPDATE_QUERY is empty
+# then the update query date shell script will be ran
+# This makes it configurable to run update query or not
+
+if [ -z ${DISABLE_UPDATE_QUERY} ]; then
+
+ while ! nc -z ${RESOURCES_HOSTNAME} ${RESOURCES_PORT} ;
+ do
+ echo "Waiting for resources to be up";
+ sleep 5;
+ done
+
+ /opt/app/aai-traversal/bin/install/updateQueryData.sh
+fi
+
CP=${COMMONLIBS_HOME}/*;
CP="$CP":${APP_HOME}/etc;
CP="$CP":${APP_HOME}/lib/*;