mirror of
https://bitbucket.org/atlassian-docker/docker-atlassian-confluence-server.git
synced 2024-08-30 18:22:16 +00:00
Merged in fork-pr-target (pull request #57)
docker: read the ReservedCodeCacheSize from the env Approved-by: Dave Chevell <dchevell@atlassian.com> Approved-by: Ben Partridge <bpartridge@atlassian.com>
This commit is contained in:
commit
55f965b1aa
@ -43,7 +43,8 @@ RUN groupadd --gid ${RUN_GID} ${RUN_GROUP} \
|
||||
&& chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/work \
|
||||
&& chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_HOME} \
|
||||
\
|
||||
&& sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh
|
||||
&& sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \
|
||||
&& sed -i -e 's/-XX:ReservedCodeCacheSize=\([0-9]\+[kmg]\)/-XX:ReservedCodeCacheSize=${JVM_RESERVED_CODE_CACHE_SIZE:=\1}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh
|
||||
|
||||
VOLUME ["${CONFLUENCE_HOME}"] # Must be declared after setting perms
|
||||
|
||||
|
@ -41,7 +41,8 @@ RUN addgroup -g ${RUN_GID} ${RUN_GROUP} \
|
||||
&& chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/work \
|
||||
&& chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_HOME} \
|
||||
\
|
||||
&& sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh
|
||||
&& sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \
|
||||
&& sed -i -e 's/-XX:ReservedCodeCacheSize=\([0-9]\+[kmg]\)/-XX:ReservedCodeCacheSize=${JVM_RESERVED_CODE_CACHE_SIZE:=\1}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh
|
||||
|
||||
VOLUME ["${CONFLUENCE_HOME}"] # Must be declared after setting perms
|
||||
|
||||
|
@ -68,6 +68,10 @@ variables.
|
||||
|
||||
The maximum heap size of the JVM
|
||||
|
||||
* `JVM_RESERVED_CODE_CACHE_SIZE` (default: 256m)
|
||||
|
||||
The reserved code cache size of the JVM
|
||||
|
||||
## Tomcat and Reverse Proxy Settings
|
||||
|
||||
If Confluence is run behind a reverse proxy server (e.g. a load-balancer or
|
||||
|
@ -9,6 +9,7 @@ def test_jvm_args(docker_cli, image, run_user):
|
||||
environment = {
|
||||
'JVM_MINIMUM_MEMORY': '383m',
|
||||
'JVM_MAXIMUM_MEMORY': '2047m',
|
||||
'JVM_RESERVED_CODE_CACHE_SIZE': '383m',
|
||||
'JVM_SUPPORT_RECOMMENDED_ARGS': '-verbose:gc',
|
||||
}
|
||||
container = run_image(docker_cli, image, user=run_user, environment=environment)
|
||||
@ -19,6 +20,7 @@ def test_jvm_args(docker_cli, image, run_user):
|
||||
|
||||
assert f'-Xms{environment.get("JVM_MINIMUM_MEMORY")}' in jvm
|
||||
assert f'-Xmx{environment.get("JVM_MAXIMUM_MEMORY")}' in jvm
|
||||
assert f'-XX:ReservedCodeCacheSize={environment.get("JVM_RESERVED_CODE_CACHE_SIZE")}' in jvm
|
||||
assert environment.get('JVM_SUPPORT_RECOMMENDED_ARGS') in jvm
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user