diff --git a/Dockerfile b/Dockerfile index 19561a1..aceaac1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -91,7 +91,8 @@ ENV LOGOUT_URL https://localhost:8443/Shibboleth.sso/Logout # Other parameters ENV MP_KEYSTORE_PASSWORD_FILE /run/secrets/mp_keystore_password.txt -ENV MP_MEM 2048m +ENV MP_MEM_MAX 2048m +ENV MP_MEM_INIT 1024m ENV TIER_RELEASE not-released-yet ENV TIER_MAINTAINER tier diff --git a/container_files/usr-local-bin/start-midpoint.sh b/container_files/usr-local-bin/start-midpoint.sh index 0ccf340..ddc377b 100755 --- a/container_files/usr-local-bin/start-midpoint.sh +++ b/container_files/usr-local-bin/start-midpoint.sh @@ -11,7 +11,8 @@ function check () { # These variables have reasonable defaults in Dockerfile. So we will _not_ supply defaults here. # The composer or user has to make sure they are well defined. -check MP_MEM +check MP_MEM_MAX +check MP_MEM_INIT check MP_DIR check REPO_DATABASE_TYPE check REPO_USER @@ -23,7 +24,7 @@ check SSO_HEADER check AJP_ENABLED check AJP_PORT -java -Xmx$MP_MEM -Xms2048m -Dfile.encoding=UTF8 \ +java -Xmx$MP_MEM_MAX -Xms$MP_MEM_INIT -Dfile.encoding=UTF8 \ -Dmidpoint.home=$MP_DIR/var \ -Dmidpoint.repository.database=$REPO_DATABASE_TYPE \ -Dmidpoint.repository.jdbcUsername=$REPO_USER \ @@ -44,4 +45,5 @@ java -Xmx$MP_MEM -Xms2048m -Dfile.encoding=UTF8 \ -Dserver.tomcat.ajp.enabled=$AJP_ENABLED \ -Dserver.tomcat.ajp.port=$AJP_PORT \ -Dlogging.path=/tmp/logtomcat \ + $MP_JAVA_OPTS \ -jar $MP_DIR/lib/midpoint.war &>/tmp/logmidpoint-console diff --git a/demo/simple/.env b/demo/simple/.env index 84e50b2..2ae3222 100644 --- a/demo/simple/.env +++ b/demo/simple/.env @@ -9,4 +9,5 @@ REPO_DATABASE=registry REPO_USER=registry_user REPO_MISSING_SCHEMA_ACTION=create REPO_UPGRADEABLE_SCHEMA_ACTION=stop -MP_MEM=2048m +MP_MEM_MAX=2048m +MP_MEM_INIT=1024m diff --git a/demo/simple/docker-compose.yml b/demo/simple/docker-compose.yml index ecadd67..2d1788c 100644 --- a/demo/simple/docker-compose.yml +++ b/demo/simple/docker-compose.yml @@ -30,7 +30,9 @@ services: - REPO_UPGRADEABLE_SCHEMA_ACTION - REPO_SCHEMA_VERSION_IF_MISSING - REPO_SCHEMA_VARIANT - - MP_MEM + - MP_MEM_MAX + - MP_MEM_INIT + - MP_JAVA_OPTS - TIER_BEACON_OPT_OUT networks: - net @@ -52,12 +54,12 @@ networks: driver: bridge secrets: - mp_host-key.pem: - file: ./configs-and-secrets/midpoint/httpd/host-key.pem mp_database_password.txt: file: ./configs-and-secrets/midpoint/application/database_password.txt mp_keystore_password.txt: file: ./configs-and-secrets/midpoint/application/keystore_password.txt + mp_host-key.pem: + file: ./configs-and-secrets/midpoint/httpd/host-key.pem volumes: midpoint_mysql: