Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afdc48d2d7 | ||
|
|
b8af7dd9e8 |
@@ -6,6 +6,7 @@ set -u
|
||||
DB_HOST=db
|
||||
APP_HOST=app
|
||||
|
||||
|
||||
set_properties()
|
||||
{
|
||||
local prop_file="$1"
|
||||
@@ -53,9 +54,15 @@ run_metasfresh()
|
||||
# info: https://docs.oracle.com/cd/E26362_01/E40761/html/known-bugs-issues.html
|
||||
# https://stackoverflow.com/a/19379760
|
||||
|
||||
# thx to
|
||||
# https://blog.csanchez.org/2017/05/31/running-a-jvm-in-a-container-without-getting-killed/
|
||||
MEMORY_PARAMS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1"
|
||||
|
||||
|
||||
cd /opt/metasfresh/ && java \
|
||||
-Dsun.misc.URLClassPath.disableJarChecking=true \
|
||||
-Xmx1024M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError \
|
||||
$MEMORY_PARAMS \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/metasfresh/heapdump \
|
||||
-DPropertyFile=/opt/metasfresh/metasfresh.properties \
|
||||
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8788 \
|
||||
-Dcom.sun.net.ssl.enableECC=false \
|
||||
|
||||
@@ -18,6 +18,7 @@ app:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volumes/app/log:/opt/metasfresh/log:rw
|
||||
- ./volumes/app/heapdump:/opt/metasfresh/heapdump:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- METASFRESH_HOME=/opt/metasfresh
|
||||
@@ -29,6 +30,7 @@ webapi:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw
|
||||
- ./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
webui:
|
||||
build: webui
|
||||
|
||||
@@ -22,6 +22,7 @@ services:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volumes/app/log:/opt/metasfresh/log:rw
|
||||
- ./volumes/app/heapdump:/opt/metasfresh/heapdump:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- METASFRESH_HOME=/opt/metasfresh
|
||||
@@ -33,6 +34,7 @@ services:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw
|
||||
- ./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
|
||||
webui:
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
#set -x
|
||||
|
||||
DB_HOST=db
|
||||
APP_HOST=app
|
||||
|
||||
echo_variable_values()
|
||||
{
|
||||
echo "*************************************************************"
|
||||
echo "Display the variable values we run with"
|
||||
echo "*************************************************************"
|
||||
echo "Note: all these variables can be set using the -e parameter."
|
||||
echo ""
|
||||
echo "DB_HOST=${DB_HOST}"
|
||||
echo "APP_HOST=${APP_HOST}"
|
||||
echo ""
|
||||
}
|
||||
|
||||
set_properties()
|
||||
{
|
||||
local prop_file="$1"
|
||||
@@ -22,10 +35,15 @@ wait_dbms()
|
||||
done
|
||||
}
|
||||
|
||||
# thx to
|
||||
# https://blog.csanchez.org/2017/05/31/running-a-jvm-in-a-container-without-getting-killed/
|
||||
MEMORY_PARAMS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1"
|
||||
|
||||
run_metasfresh()
|
||||
{
|
||||
cd /opt/metasfresh-webui-api/ && java -Dsun.misc.URLClassPath.disableJarChecking=true \
|
||||
-Xmx1024M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError \
|
||||
$MEMORY_PARAMS \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/metasfresh-webui-api/heapdump \
|
||||
-DPropertyFile=/opt/metasfresh-webui-api/metasfresh.properties \
|
||||
-Dcom.sun.management.jmxremote.port=1618 \
|
||||
-Dcom.sun.management.jmxremote.authenticate=false \
|
||||
@@ -34,6 +52,7 @@ run_metasfresh()
|
||||
-jar metasfresh-webui-api.jar
|
||||
}
|
||||
|
||||
echo_variable_values
|
||||
|
||||
set_properties /opt/metasfresh-webui-api/metasfresh.properties
|
||||
set_properties /opt/metasfresh-webui-api/local_settings.properties
|
||||
|
||||
Reference in New Issue
Block a user