Skip to content
Snippets Groups Projects
Commit 193d28b8 authored by Vincent Massol's avatar Vincent Massol
Browse files

XDOCKER-116: Document how to modify the Tomcat configuraton

parent 4b9ffdb7
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ As an application wiki, XWiki allows for the storing of structured data and the ...@@ -14,7 +14,7 @@ As an application wiki, XWiki allows for the storing of structured data and the
- [Introduction](#introduction) - [Introduction](#introduction)
- [How to use this image](#how-to-use-this-image) - [How to use this image](#how-to-use-this-image)
- [Pulling existing image](#pulling-existing-image) - [Pulling existing image](#pulling-an-existing-image)
- [Using docker run](#using-docker-run) - [Using docker run](#using-docker-run)
- [Using docker-compose](#using-docker-compose) - [Using docker-compose](#using-docker-compose)
- [Using Docker Swarm](#using-docker-swarm) - [Using Docker Swarm](#using-docker-swarm)
...@@ -22,6 +22,7 @@ As an application wiki, XWiki allows for the storing of structured data and the ...@@ -22,6 +22,7 @@ As an application wiki, XWiki allows for the storing of structured data and the
- [Preparing Solr container](#preparing-solr-container) - [Preparing Solr container](#preparing-solr-container)
- [Docker run example](#docker-run-example) - [Docker run example](#docker-run-example)
- [Docker Compose example](#docker-compose-example) - [Docker Compose example](#docker-compose-example)
- [Configuring Tomcat](#configuring-tomcat)
- [Building](#building) - [Building](#building)
- [Upgrading XWiki](#upgrading-xwiki) - [Upgrading XWiki](#upgrading-xwiki)
- [Details for the xwiki image](#details-for-the-xwiki-image) - [Details for the xwiki image](#details-for-the-xwiki-image)
...@@ -53,7 +54,7 @@ Then there are several options: ...@@ -53,7 +54,7 @@ Then there are several options:
1. Pull the xwiki image from DockerHub. 1. Pull the xwiki image from DockerHub.
2. Get the [sources of this project](https://github.com/xwiki-contrib/docker-xwiki) and build them. 2. Get the [sources of this project](https://github.com/xwiki-contrib/docker-xwiki) and build them.
## Pulling existing image ## Pulling an existing image
You need to run 2 containers: You need to run 2 containers:
...@@ -476,6 +477,24 @@ volumes: ...@@ -476,6 +477,24 @@ volumes:
solr-data: {} solr-data: {}
``` ```
## Configuring Tomcat
If you need to configure Tomcat (for example to setup a reverse proxy configuration), you'll need to mount the Tomcat configuration directory (`/usr/local/tomcat/conf`) inside the image onto your local host.
If you want to modify the existing configuration rather than provide a brand new one, you'll need to use `docker cp` to copy the configuration from the container to your local host.
Here are some example steps you can follow:
- Create a docker container from the XWiki image with `docker create`.
- Example: `docker create --name xwiki xwiki:lts-mysql-tomcat`.
- Copy the Tomcat configuration from the container to the host to start with some existing configuration files, using `docker cp`.
- Example: `sudo docker cp xwiki:/usr/local/tomcat/conf /tmp/tomcat`.
- Modify the Tomcat configuration locally to bring the changes you need.
- Delete the created XWiki container since it was only used to copy the configuration files and we'll need to create a new one with different parameters.
- Example: `docker rm xwiki`.
- Run the container with the Tomcat mount and the other parameters.
- Example= `docker run --net=xwiki-nw --name xwiki -p 8080:8080 -v /tmp/xwiki:/usr/local/xwiki -v /tmp/tomcat:/usr/local/tomcat/conf -e DB_USER=xwiki -e DB_PASSWORD=xwiki -e DB_DATABASE=xwiki -e DB_HOST=mysql-xwiki xwiki:lts-mysql-tomcat`
## Building ## Building
This allows you to rebuild the XWiki docker image locally. Here are the steps: This allows you to rebuild the XWiki docker image locally. Here are the steps:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.