summaryrefslogtreecommitdiffstats
path: root/datarouter-node/src/main/resources/docker
diff options
context:
space:
mode:
Diffstat (limited to 'datarouter-node/src/main/resources/docker')
-rw-r--r--datarouter-node/src/main/resources/docker/Dockerfile7
-rw-r--r--datarouter-node/src/main/resources/docker/startup.sh18
2 files changed, 25 insertions, 0 deletions
diff --git a/datarouter-node/src/main/resources/docker/Dockerfile b/datarouter-node/src/main/resources/docker/Dockerfile
new file mode 100644
index 00000000..fbf54566
--- /dev/null
+++ b/datarouter-node/src/main/resources/docker/Dockerfile
@@ -0,0 +1,7 @@
+FROM java:8
+ADD opt /opt/
+ADD startup.sh /startup.sh
+RUN chmod 700 /startup.sh
+ENTRYPOINT ./startup.sh start
+EXPOSE 8443
+EXPOSE 8080 \ No newline at end of file
diff --git a/datarouter-node/src/main/resources/docker/startup.sh b/datarouter-node/src/main/resources/docker/startup.sh
new file mode 100644
index 00000000..8cb71dd6
--- /dev/null
+++ b/datarouter-node/src/main/resources/docker/startup.sh
@@ -0,0 +1,18 @@
+LIB=/opt/app/datartr/lib
+ETC=/opt/app/datartr/etc
+echo "this is LIB" $LIB
+echo "this is ETC" $ETC
+mkdir -p /opt/app/datartr/logs
+mkdir -p /opt/app/datartr/spool
+mkdir -p /opt/app/datartr/spool/f
+mkdir -p /opt/app/datartr/spool/n
+mkdir -p /opt/app/datartr/spool/s
+CLASSPATH=$ETC
+for FILE in `find $LIB -name *.jar`; do
+ CLASSPATH=$CLASSPATH:$FILE
+done
+java -classpath $CLASSPATH com.att.research.datarouter.node.NodeMain
+
+runner_file="$LIB/datarouter-node-jar-with-dependencies.jar"
+echo "Starting using" $runner_file
+java -Dcom.att.eelf.logging.file==/opt/app/datartr/etc/logback.xml -Dcom.att.eelf.logging.path=/ -Dcom.att.research.datarouter.node.ConfigFile==/opt/app/datartr/etc/node.properties -jar $runner_file \ No newline at end of file