From 34109f648127e1efa0479a1fa7bb1ebf941f27a3 Mon Sep 17 00:00:00 2001 From: tawoe Date: Mon, 23 Jan 2023 13:36:32 +0100 Subject: [PATCH] container production mode as default --- .github/Dockerfile_PreBuild | 4 +++- .github/Dockerfile_PreBuild_OC | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/Dockerfile_PreBuild b/.github/Dockerfile_PreBuild index 1783b4370..9b376415c 100644 --- a/.github/Dockerfile_PreBuild +++ b/.github/Dockerfile_PreBuild @@ -1,5 +1,7 @@ FROM jetty:9.4.50-jre11-alpine -# Copy OBP source code # Copy build artifact (.war file) into jetty from 'maven' stage. COPY /obp-api/target/obp-api-1.*.war /var/lib/jetty/webapps/ROOT.war + +# Run jetty in production mode +ENV JAVA_OPTIONS='-Drun.mode=production' \ No newline at end of file diff --git a/.github/Dockerfile_PreBuild_OC b/.github/Dockerfile_PreBuild_OC index 107c71f70..e3512d3c8 100644 --- a/.github/Dockerfile_PreBuild_OC +++ b/.github/Dockerfile_PreBuild_OC @@ -1,6 +1,8 @@ FROM jetty:9.4.50-jre11-alpine # Copy build artifact (.war file) into jetty from 'maven' stage. COPY /obp-api/target/obp-api-1.*.war /var/lib/jetty/webapps/ROOT.war +# Run jetty in production mode +ENV JAVA_OPTIONS='-Drun.mode=production' USER root RUN chgrp -R 0 /tmp/jetty && chmod -R g+rwX /tmp/jetty RUN chgrp -R 0 /var/lib/jetty && chmod -R g+rwX /var/lib/jetty