Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Passing system properties to Confluence container

Matt Doller
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 14, 2018

Is there any way to configure confluence system properties *without* placing them in the confluence.cfg.xml file? I am in the middle of a rebuild of our confluence setup, and I'm using the official docker image (https://hub.docker.com/r/atlassian/confluence-server/) to run our new confluence instance. The end goal of this project is to be able to tear down the machines running the docker image, and to provision new instances, all in an automated fashion. The problem I'm running into is that it seems the only place to setup system properties is within the confluence.cfg.xml file. Now I can create a copy of this file, add my database configuration in there, and then mount it in the container when it starts, but there is a fair amount in that file that probably shouldn't be managed by me - the jwt.private.key and jwt.public key, for example.

So, is there a way to provide system properties for things like:

  • atlassian.license.message
  • confluence.setup.server.id
  • hibernate.connection.*
  • synchrony.host

In a properties file or through environment variables that are then passed to the container?

  1. Can something like hibernate.connection.url be added to the CATALINA_OPTS environment variable when launching the container? I've tried this ("-Dhibernate.connection.url='...'"), and it seems to be ignored.
  2. Are there any other properties files used by confluence when it starts to read in system properties that I can mount in the container? Can the setenv.sh file be leveraged here?
  3. can the args be passed directly to the "docker run ..." command? I'd like to avoid this option if at all possible, because it would contain the database password in plaintext, and would be visible to anyone running `ps`.

Thanks,
Matt

1 answer

0 votes
Gavin McDonald June 15, 2018

The docker page you link to says :-

 

Example:

$> docker run -e JVM_SUPPORT_RECOMMENDED_ARGS=-Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server

Did you try adding in your hibernate values that way?

 

(Also note the Support paragraph near the bottom stating the docker image as is wont be supported by Atlassian, so I'd be careful using it in production.)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events