Quantcast
Channel: XWiki Forum - Latest topics
Viewing all articles
Browse latest Browse all 1220

Docker swarm - how to provide custom configuration?

$
0
0

According to the xwiki-docker/README the three main configuration files

    • xwiki.cfg: $WEB-INF/xwiki.cfg
    • xwiki.properties: $WEB-INF/xwiki.properties
    • hibernate.cfg.xml: $WEB-INF/hibernate.cfg.xml

are copied over from the permanent directory /usr/local/xwiki to the $WEB-INF folder when the container is starting (due to backward compatibility reasons, also discussed here Improve XWiki docker image configuration strategy.

However, this seems not to be the case (anymore?), at least not for v17.

Here you can see that xwiki.cfg has different size on the permanent directory compared to the runtime directory:

root@a51afa88f2b9:/usr/local/tomcat# ls -al webapps/ROOT/WEB-INF/xwiki*
-rw-r--r-- 1 root root 25650 Feb 11 15:12 webapps/ROOT/WEB-INF/xwiki.cfg
-rw-r--r-- 1 root root   119 Jan 28 08:58 webapps/ROOT/WEB-INF/xwiki-locales.txt
-rw-r--r-- 1 root root 80468 Feb 11 15:12 webapps/ROOT/WEB-INF/xwiki.properties
root@a51afa88f2b9:/usr/local/tomcat# ls -al /usr/local/xwiki/xwiki*
-rw-r--r-- 1 root root 25656 Feb 11 15:12 /usr/local/xwiki/xwiki.cfg
-rw-r--r-- 1 root root 80468 Feb 11 14:37 /usr/local/xwiki/xwiki.properties
root@a51afa88f2b9:/usr/local/tomcat#

The problem is that I am using Docker Swarm and cannot map directly a file from an NFS-mount into the container service (in the docs, it’s proposed to do something like -v /local/path/to/xwiki.cfg:/usr/local/tomcat/webapps/ROOT/WEB-INF/xwiki.cfg but this does not work in Swarm mode).

I tried using docker configs but Docker cannot map the config files during container start because the volume is mounted read-only.

I am wondering how to provide custom configuration to the XWiki instance when running on Docker Swarm. Any ideas?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1220

Trending Articles