Officiel: https://xwiki.com/en/Blog/HowtoinstallXWikiusingDocker/
I Use: https://github.com/xwiki/xwiki-docker - And a hidden .evn file:
# Default environment values XWIKI_VERSION=16.10.11 DB_USER=xwiki DB_PASSWORD=******** DB_DATABASE=xwiki POSTGRES_ROOT_PASSWORD=*********' |
The Docker Compose file:
networks:
bridge:
driver: bridge
services:
# The container that runs XWiki in Tomcat, with the appropriate JDBC driver (for postgres).
web:
image: "xwiki:${XWIKI_VERSION}-postgres-tomcat"
container_name: xwiki-postgres-tomcat-web
restart: unless-stopped
depends_on:
- db
ports:
- "8080:8080"
# Default values defined in .env file.
# The DB_USER/DB_PASSWORD/DB_DATABASE/DB_HOST variables are used in the hibernate.cfg.xml file.
environment:
- XWIKI_VERSION=${XWIKI_VERSION}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_DATABASE=${DB_DATABASE}
- DB_HOST=xwiki-postgres-db
- JAVA_OPTS="-Xmx2048m"
- TZ=Europe/Copenhagen
# Provide a name instead of an auto-generated id for xwiki data (the permanent directory in included in it)
# configured in the Dockerfile, to make it simpler to identify in 'docker volume ls'.
volumes:
- /data/xwiki/xwiki-data:/usr/local/xwiki
networks:
- bridge
# The container that runs the database (postgres)
db:
image: "postgres:17"
container_name: xwiki-postgres-db
restart: unless-stopped
volumes:
- /data/xwiki/postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_ROOT_PASSWORD=${POSTGRES_ROOT_PASSWORD}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USER}
- POSTGRES_DB=${DB_DATABASE}
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale-provider=builtin --locale=C.UTF-8
networks:
- bridge |
Go to the Web-interface and do the installation to end after startup.
This can vary a bit - but for my migration scripts, these may be needed as they do substitute several Confluence Macro's:
If You use Gliffy in Confluence, install Draw.io on Confluence as trial and migrate all Gliffy drawings to Draw.io - As the Gliffy macro etc is not supported at all in XWiki. |
Clone migration from bitbucket.org, create a python env in the cloned dir and install requirements:
You may neeed to: apt install python3.12-venv |
git clone https://moseiseydk@bitbucket.org/moseiseydk/confluence-migrate.git python3 -m venv confluence-migrate cd confluence-migrate source bin/activate pip install requests pip install atlassian-python-api pip install python-slugify |
Create the config.py file:
username = '' password = '' conflunce_url = 'https://www.server.dk' xwiki_url = 'https://xwiki.server.dk' |
Edit the confluence.py file and add all space keys
space_keys = ["test","familieblog","anmeldelser","andrebilleder","khvg145","familiebilleder","it","ATLASSIAN"] |
Take a backup / snapshot of the server her - its a baseline |
Execute the migration script:
Limitations:
|
python3 confluence.py > log.txt |
Examine log.txt for:
cat log.txt | grep restrictons Read restrictons for user: bnp@mos-eisley.dk on Page: Kamerarer (61112322) Read restrictons for user: noreply@mos-eisley.dk on Page: Kamerarer (61112322) Read restrictons for group: familie on Page: 2 x 40 års fødselsdag (38600797) Read restrictons for user: bnp@mos-eisley.dk on Page: Christophers Nonfirmation 28-04-2018 (82182177) Read restrictons for user: noreply@mos-eisley.dk on Page: Christophers Nonfirmation 28-04-2018 (82182177) Update restrictons for user: bnp@mos-eisley.dk on Page: Christophers Nonfirmation 28-04-2018 (82182177) Read restrictons for user: bnp@mos-eisley.dk on Page: Sommerferie 2015 (59408386) Read restrictons for user: bnp@mos-eisley.dk on Page: Road Trip Sommerferie 2025 (272629841) |
In things went wrong, roll back to the backup.
You may want to style Xwiki, I do a different Theme and a little CSS:
#xwikimaincontainer { width: 1400px !important;} |