aboutsummaryrefslogtreecommitdiffstats
path: root/packages/policy-pap-docker/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'packages/policy-pap-docker/src/main')
-rw-r--r--packages/policy-pap-docker/src/main/docker/Dockerfile8
-rw-r--r--packages/policy-pap-docker/src/main/docker/policy-pap.sh18
2 files changed, 17 insertions, 9 deletions
diff --git a/packages/policy-pap-docker/src/main/docker/Dockerfile b/packages/policy-pap-docker/src/main/docker/Dockerfile
index 337352fe..36205643 100644
--- a/packages/policy-pap-docker/src/main/docker/Dockerfile
+++ b/packages/policy-pap-docker/src/main/docker/Dockerfile
@@ -2,6 +2,7 @@
# Dockerfile
# ============LICENSE_START=======================================================
# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -31,14 +32,17 @@ ENV POLICY_HOME=$POLICY_HOME/pap
RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin && \
chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \
mkdir /packages
-COPY /maven/* /packages
+COPY /maven/lib/policy-pap.tar.gz /packages
+
RUN tar xvfz /packages/policy-pap.tar.gz --directory $POLICY_HOME \
&& rm /packages/policy-pap.tar.gz
WORKDIR $POLICY_HOME
COPY policy-pap.sh bin/.
+COPY /maven/pap.jar /app
+
-RUN chown -R policy:policy * && chmod 755 bin/*.sh
+RUN chown -R policy:policy * && chmod 755 bin/*.sh && chown -R policy:policy /app
USER policy
WORKDIR $POLICY_HOME/bin
diff --git a/packages/policy-pap-docker/src/main/docker/policy-pap.sh b/packages/policy-pap-docker/src/main/docker/policy-pap.sh
index 26e69503..a276e34f 100644
--- a/packages/policy-pap-docker/src/main/docker/policy-pap.sh
+++ b/packages/policy-pap-docker/src/main/docker/policy-pap.sh
@@ -3,6 +3,7 @@
# ============LICENSE_START=======================================================
# Copyright (C) 2019-2020 Nordix Foundation.
# Modifications Copyright (C) 2019-2021 AT&T Intellectual Property.
+# Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -32,8 +33,10 @@ else
CONFIG_FILE=${CONFIG_FILE}
fi
+touch /app/pap.jar
+
if [ -z "$CONFIG_FILE" ]; then
- CONFIG_FILE="${POLICY_HOME}/etc/defaultConfig.json"
+ CONFIG_FILE="${POLICY_HOME}/etc/papParameters.yaml"
fi
echo "Policy pap config file: $CONFIG_FILE"
@@ -59,14 +62,15 @@ fi
# to load a default group.
if [ -f "${POLICY_HOME}/etc/mounted/groups.json" ]; then
- CUSTOM_GROUPS="-g ${POLICY_HOME}/etc/mounted/groups.json"
+ CUSTOM_GROUPS="${POLICY_HOME}/etc/mounted/groups.json"
fi
-$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" \
+$JAVA_HOME/bin/java \
-Dlogback.configurationFile="${POLICY_HOME}/etc/logback.xml" \
- -Djavax.net.ssl.keyStore="${KEYSTORE}" \
- -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD}" \
+ -Dserver.ssl.key-store="${KEYSTORE}" \
+ -Dserver.ssl.key-store-password="${KEYSTORE_PASSWD}" \
-Djavax.net.ssl.trustStore="${TRUSTSTORE}" \
-Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" \
- org.onap.policy.pap.main.startstop.Main \
- -c "${CONFIG_FILE}" ${CUSTOM_GROUPS}
+ -jar /app/pap.jar \
+ --spring.config.location="${CONFIG_FILE}" \
+ --group-config-file="${CUSTOM_GROUPS}"