summaryrefslogtreecommitdiffstats
path: root/packages/docker
diff options
context:
space:
mode:
Diffstat (limited to 'packages/docker')
-rw-r--r--packages/docker/src/main/docker/docker-files/Dockerfile.so-app1
-rw-r--r--packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml8
-rw-r--r--packages/docker/src/main/docker/docker-files/scripts/start-app.sh61
3 files changed, 39 insertions, 31 deletions
diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app
index 1048027..f5ae534 100644
--- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app
+++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app
@@ -28,4 +28,5 @@ VOLUME /app/config
VOLUME /app/ca-certificates
WORKDIR /app
+RUN ["chmod", "+x", "/app/start-app.sh"]
ENTRYPOINT ["/app/start-app.sh"]
diff --git a/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml b/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml
index 693d8c4..492420f 100644
--- a/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml
+++ b/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml
@@ -173,15 +173,11 @@
<logger name="org.springframework" level="WARN" />
<logger name="org.springframework.security.authentication.dao.DaoAuthenticationProvider" level="DEBUG" />
- <!-- Camunda related loggers -->
- <logger name="org.camunda.bpm.engine.jobexecutor.level" level="WARN" />
- <logger name="org.camunda.bpm.engine.impl.persistence.entity.JobEntity.level" level="WARN" />
-
<logger name="org.apache.wire" level="DEBUG" />
<logger name="org.onap" level="DEBUG" />
- <logger name="com.att.ecomp" level="DEBUG" />
+
<logger name="org.apache.cxf.interceptor" level="DEBUG" />
- <logger name="com.att.commons" level="DEBUG" />
+
<logger name="org.reflections" level="ERROR" />
<logger name="AUDIT" level="INFO" additivity="false">
diff --git a/packages/docker/src/main/docker/docker-files/scripts/start-app.sh b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh
index 54ed9ed..28a3f07 100644
--- a/packages/docker/src/main/docker/docker-files/scripts/start-app.sh
+++ b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh
@@ -1,36 +1,49 @@
#!/bin/sh
-#temprary condition
+
if [ `id -u` = 0 ]
then
- # Install certificates found in the /app/ca-certificates volume, if any.
+ # Install certificates found in the /app/ca-certificates volume, if any.
+
+ needUpdate=FALSE
- needUpdate=FALSE
+ for certificate in `ls -1 /app/ca-certificates`; do
+ echo "Installing $certificate in /usr/local/share/ca-certificates"
+ cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
+ needUpdate=TRUE
+ done
- for certificate in `ls -1 /app/ca-certificates`; do
- echo "Installing $certificate in /usr/local/share/ca-certificates"
- # cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
- needUpdate=FALSE
- done
+ if [ $needUpdate = TRUE ]; then
+ update-ca-certificates --fresh
+ fi
- # Re-exec this script as the 'onap' user.
- this=`readlink -f $0`
- # exec su so -c "$this"
+ # Re-exec this script as the 'onap' user.
+ this=`readlink -f $0`
+ exec su so -c "$this"
fi
touch /app/app.jar
+if [ -z "$APP" ]; then
+ echo "CONFIG ERROR: APP environment variable not set"
+ exit 1
+fi
+
if [ ! -z "$DB_HOST" -a -z "$DB_PORT" ]; then
- export DB_PORT=3306
+ export DB_PORT=3306
fi
if [ -z "${CONFIG_PATH}" ]; then
- export CONFIG_PATH=/app/config/override.yaml
+ export CONFIG_PATH=/app/config/override.yaml
+fi
+
+if [ -z "${LOG_PATH}" ]; then
+ export LOG_PATH="logs/${APP}"
fi
if [ "${SSL_DEBUG}" = "log" ]; then
- export SSL_DEBUG="-Djavax.net.debug=all"
+ export SSL_DEBUG="-Djavax.net.debug=all"
else
- export SSL_DEBUG=
+ export SSL_DEBUG=
fi
# Set java keystore and truststore options, if specified in the environment.
@@ -38,18 +51,18 @@ fi
jksargs=
if [ ! -z "${KEYSTORE}" ]; then
- jksargs="$jksargs -Dmso.load.ssl.client.keystore=true"
- jksargs="$jksargs -Djavax.net.ssl.keyStore=$KEYSTORE"
- jksargs="$jksargs -Djavax.net.ssl.keyStorePassword=${KEYSTORE_PASSWORD}"
+ jksargs="$jksargs -Dmso.load.ssl.client.keystore=true"
+ jksargs="$jksargs -Djavax.net.ssl.keyStore=$KEYSTORE"
+ jksargs="$jksargs -Djavax.net.ssl.keyStorePassword=${KEYSTORE_PASSWORD}"
fi
if [ ! -z "${TRUSTSTORE}" ]; then
- jksargs="$jksargs -Djavax.net.ssl.trustStore=${TRUSTSTORE}"
- jksargs="$jksargs -Djavax.net.ssl.trustStorePassword=${TRUSTSTORE_PASSWORD}"
+ jksargs="$jksargs -Djavax.net.ssl.trustStore=${TRUSTSTORE}"
+ jksargs="$jksargs -Djavax.net.ssl.trustStorePassword=${TRUSTSTORE_PASSWORD}"
fi
if [ -z "${ACTIVE_PROFILE}" ]; then
- export ACTIVE_PROFILE="basic"
+ export ACTIVE_PROFILE="basic"
fi
jvmargs="${JVM_ARGS} -Dspring.profiles.active=${ACTIVE_PROFILE} -Djava.security.egd=file:/dev/./urandom -Dlogs_dir=${LOG_PATH} -Dlogging.config=/app/logback-spring.xml $jksargs -Dspring.config.additional-location=$CONFIG_PATH ${SSL_DEBUG} ${DISABLE_SNI}"
@@ -68,8 +81,6 @@ read_properties(){
EOF
}
-
-
if [ -n "${AAF_SSL_CERTS_ENABLED}" ]; then
read_properties "$(head -n 4 /app/certs/.passphrases)"
fi
@@ -82,8 +93,8 @@ rc=$?
echo "Application exiting with status code $rc"
if [ ! -z "${EXIT_DELAY}" -a "${EXIT_DELAY}" != 0 ]; then
- echo "Delaying $APP exit for $EXIT_DELAY seconds"
- sleep $EXIT_DELAY
+ echo "Delaying $APP exit for $EXIT_DELAY seconds"
+ sleep $EXIT_DELAY
fi
exit $rc