Forums

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

Docker Confluence not persisent seraph-config

Philipp Kayser
Contributor
September 4, 2019

I'm using the latest official confluence docker image with a persistent volume for /opt and /var.

 

When I change the seraph-config.xml for Crowd SSO inside the container or directly on volume it will be overwritten after a restart and not take effect.

 

confluence_1  | INFO:root:Generating /opt/atlassian/confluence/confluence/WEB-INF/classes/seraph-config.xml from template seraph-config.xml.j2

2 answers

1 accepted

0 votes
Answer accepted
Dave Chevell
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 4, 2019

@Philipp Kayser This file is being generated from a Jinja2 template, which can be found at /opt/atlassian/etc/seraph-config.xml.j2 inside the container. If you want to replace the template with your own template (this can contain merge fields, or can be a "normal" static file you've hand-crafted), simply overwrite the template file.

For example, to build from our image with your custom file:

FROM atlassian/confluence-server:latest
COPY seraph-config.xml /opt/atlassian/etc/seraph-config.xml.j2

You can also edit the "live" version of the template inside a running container, or copy your own file into a running container also. In other words, if you want to change it, change the template by whichever method you find most appropriate.

 

Having said that: Can you advise what changes you want to make to seraph-config.xml (I can guess, but I would like to make 100% sure).

One of our aims with our Docker images is to allow the maximum amount of from-the-environment configuration, since containers should be able to be "disposable" and configuration should always be able to be injected. If I can confirm your use case we can take a look at ways we can enable injecting the configuration you're after via a supported environment variable, which would allow you to avoid editing the file altogether

Philipp Kayser
Contributor
September 4, 2019

Thank you! It would be great for future to use more env-variables for the configuration like enabling crowd and sso.

crbreingan February 5, 2020

I am editing the serph-config to allow for Crowd SSO. I have the serph-config set as a volume, but every time I restart the container, it overwrites the file. This seems like a bug in the Confluence container. It shouldn't overwrite the config file that I've edited from a volume. 

1 vote
Rafael Pinto Sperafico
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2019

Hi @Philipp Kayser ,

Latest Official Confluence docker image - just to confirm, are you referring to https://hub.docker.com/r/atlassian/confluence-server

docker pull atlassian/confluence-server

Tested by starting Atlassian Confluence following the Quick Start from Docker Hub link above:

docker run -v /data/your-confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server

If so, could you please confirm if the seraph-config.xml file you are modified preserves its original user and group permission, meaning that if you run the following command:

docker exec -it confluence /bin/bash -c "ls -l /opt/atlassian/confluence/confluence/WEB-INF/classes/seraph-config.xml"

Do you seen root root for seraph-config.xml?

-rw-r--r-- 1  root root   2841 Sep  4 13:44 seraph-config.xml

Kind regards,
Rafael

Philipp Kayser
Contributor
September 4, 2019

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events