From 679f2eec47574c1b67681c94376372ce39b0baf4 Mon Sep 17 00:00:00 2001 From: David Gauldie Date: Wed, 6 Nov 2024 10:40:58 -0500 Subject: [PATCH 1/2] adding heap size flags to HMI-server --- packages/server/docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/docker/Dockerfile b/packages/server/docker/Dockerfile index ae325d439d..232faaea7e 100644 --- a/packages/server/docker/Dockerfile +++ b/packages/server/docker/Dockerfile @@ -21,10 +21,12 @@ RUN groupadd -r terarium \ VOLUME /tmp USER terarium +ENV JAVA_OPTS="-XX:InitialRAMPercentage=10 -XX:MinRAMPercentage=80 -XX:MaxRAMPercentage=80" + # copy over the layers ARG LAYERS=/app/layers COPY --from=builder ${LAYERS}/dependencies/ ./ COPY --from=builder ${LAYERS}/snapshot-dependencies/ ./ COPY --from=builder ${LAYERS}/spring-boot-loader/ ./ COPY --from=builder ${LAYERS}/application/ ./ -ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"] +ENTRYPOINT ["java", "$JAVA_OPTS", "org.springframework.boot.loader.JarLauncher"] From 198e4321f36daeb79de902e9203707822906992c Mon Sep 17 00:00:00 2001 From: David Gauldie Date: Wed, 6 Nov 2024 15:50:41 -0500 Subject: [PATCH 2/2] reduce to 50% --- packages/server/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/docker/Dockerfile b/packages/server/docker/Dockerfile index 232faaea7e..24f5aa7465 100644 --- a/packages/server/docker/Dockerfile +++ b/packages/server/docker/Dockerfile @@ -21,7 +21,7 @@ RUN groupadd -r terarium \ VOLUME /tmp USER terarium -ENV JAVA_OPTS="-XX:InitialRAMPercentage=10 -XX:MinRAMPercentage=80 -XX:MaxRAMPercentage=80" +ENV JAVA_OPTS="-XX:InitialRAMPercentage=10 -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=50" # copy over the layers ARG LAYERS=/app/layers