Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add MP_MEM_MAX, MP_MEM_INIT, MP_JAVA_OPTS vars
MP_MEM_MAX was originally known as MP_MEM.

MP_JAVA_OPTS can be used to send arbitrary options to Java
that hosts midPoint.
mederly committed Oct 3, 2018
1 parent c543811 commit 5136560
Showing 4 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion 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

6 changes: 4 additions & 2 deletions 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
3 changes: 2 additions & 1 deletion 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
8 changes: 5 additions & 3 deletions 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:

0 comments on commit 5136560

Please sign in to comment.