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
@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
Thank you! It would be great for future to use more env-variables for the configuration like enabling crowd and sso.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rafael,
everything is fine. I've got my answer in https://community.atlassian.com/t5/Confluence-questions/Docker-Confluence-not-persisent-seraph-config/qaq-p/1169979#M152753
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.