cptactionhank / docker-atlassian-jira

Atlassian JIRA Core wrapped in a Docker image
https://cptactionhank.github.io/docker-atlassian-jira
MIT License
621 stars 248 forks source link

Configure JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY #79

Open eampudia opened 6 years ago

eampudia commented 6 years ago

Dear Martin, Thanks for your contribution to the docker community, it will be nice to be able to changes the values of the memory to run Jira adding some docker variables.

Thanks,

Emilio

0rph3us commented 5 years ago

I have a small fix for this problem in my own Dockerfile

FROM cptactionhank/atlassian-jira:7.12.2

USER root:root

ENV JVM_MAXIMUM_MEMORY 768m
ENV JVM_MINIMUM_MEMORY 384m

# make memory 
RUN set -x \
    && sed --in-place 's/JVM_MINIMUM_MEMORY=.*/#JVM_MINIMUM_MEMORY=/g' /opt/atlassian/jira/bin/setenv.sh \
    && sed --in-place 's/JVM_MAXIMUM_MEMORY=.*/#JVM_MAXIMUM_MEMORY=/g' /opt/atlassian/jira/bin/setenv.sh

# change user
USER daemon:daemon
bradjones1 commented 5 years ago

An option would also be to mount your own setenv.sh on top of the existing one, at runtime. You can mount a specific item in a config map in K8s, per this SO answer.

riav commented 5 years ago

It is possible to change the memory parameters, among others, through the variable JAVA_OPTS

JAVA_OPTS: "-Xms4g -Xmx4g"