Configuration Files in the XWiki Docker Image
Where xwiki.cfg, xwiki.properties, hibernate.cfg.xml and the other configuration files sit inside the container, with what each one holds.
Reference
To customize a configuration file, bind-mount the corresponding file or directory from the host machine to its path inside the container.
| Configuration Item | Path inside the Docker Image | Description |
|---|---|---|
| Permanent directory | /usr/local/xwiki | Persistent data. |
| xwiki.cfg | $WEB-INF/xwiki.cfg | Main XWiki configuration file. |
| xwiki.properties | $WEB-INF/xwiki.properties | Advanced XWiki properties. |
| hibernate.cfg.xml | $WEB-INF/hibernate.cfg.xml | Hibernate database configuration. |
| Clustering (JGroups) | $WEB-INF/observation/remote/jgroups | Cluster communication configuration. |
| logback.xml | $WEB-INF/classes/logback.xml | Logging configuration. |
| web.xml | $WEB-INF/web.xml | Web application deployment descriptor. |
$WEB-INF is the location of the XWiki WAR's WEB-INF directory inside the container, at /usr/local/tomcat/webapps/$CONTEXT_PATH/WEB-INF/, where $CONTEXT_PATH is the Servlet context deployment name of the XWiki webapp, ROOT by default.
FAQ
Are configuration files still copied automatically to the permanent directory?
No. The image does not copy xwiki.cfg, xwiki.properties and hibernate.cfg.xml into the permanent directory on the first start. For backward compatibility, when those files are found in the permanent directory they are still copied to their location inside the container on every start.
Where are the XWiki logs?
XWiki logs to the container console, which you read with docker logs, and Tomcat writes its own logs inside the container, in /usr/local/tomcat/logs. See XWiki Logs in the Docker Image for every destination, how to read each one, and which of them survive the removal of the container.
Can I change a configuration file while the container is running?
Stop the container before changing a mounted configuration file, then start it again so that the change is applied in a clean startup. For example editing web.xml in particular while the container is running can make Tomcat reload the web application, which can cause errors (see How can I change the Session timeout).
More
To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.