summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorPrudence Au <prudence.au@amdocs.com>2018-08-07 21:00:32 -0400
committerPrudence Au <prudence.au@amdocs.com>2018-08-07 21:00:42 -0400
commit39645e869455f55f8873bf814ae9679476bb5509 (patch)
treef8697736a6f8fd82b582dc4b5771eaba558778e7 /src/main
parent65c5d8b92e759ec4ee9d13f048b069033b4bf097 (diff)
Dockerfile for context aggregator
Change-Id: Idda5e6e84092676c170420fbb74d3041abed4f21 Issue-ID: LOG-519 Signed-off-by: Prudence Au <prudence.au@amdocs.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/docker/Dockerfile19
-rw-r--r--src/main/docker/startService.sh9
2 files changed, 28 insertions, 0 deletions
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
new file mode 100644
index 0000000..0cdd1cf
--- /dev/null
+++ b/src/main/docker/Dockerfile
@@ -0,0 +1,19 @@
+FROM anapsix/alpine-java:jre8
+
+ARG MICROSERVICE_HOME=/opt/app/
+
+# Build up the deployment folder structure
+RUN mkdir -p $MICROSERVICE_HOME
+RUN mkdir -p $MICROSERVICE_HOME/config/
+RUN mkdir -p $MICROSERVICE_HOME/lib/
+RUN mkdir -p $MICROSERVICE_HOME/bin/
+
+ADD target/pomba-context-aggregator.jar $MICROSERVICE_HOME/lib/
+COPY config/ $MICROSERVICE_HOME/config/
+ADD target/startService.sh $MICROSERVICE_HOME/bin/
+
+RUN chmod 755 $MICROSERVICE_HOME/config/*
+RUN chmod 755 $MICROSERVICE_HOME/lib/*
+RUN chmod 755 $MICROSERVICE_HOME/bin/*
+
+CMD ["/opt/app/bin/startServer.sh"]
diff --git a/src/main/docker/startService.sh b/src/main/docker/startService.sh
new file mode 100644
index 0000000..fd555ff
--- /dev/null
+++ b/src/main/docker/startService.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+cd /opt/app
+if [ -z "${java_runtime_arguments}" ]; then
+ java -Dlogging.config=config/logback.xml -Xms128m -Xmx512m -jar /opt/app/lib/pomba-context-aggregator.jar
+
+else
+ java -Dlogging.config=config/logback.xml $java_runtime_arguments -jar /opt/app/lib/pomba-context-aggregator.jar
+fi