I wanted to test DokuWiki as an alternative to my Confluence Data Center - see Confluence Data Center to Wiki thoughts...
Installation
So I created a docker with a docker-compose.yml file.
Reference from https://github.com/dokuwiki/docker
services: dokuwiki: image: dokuwiki/dokuwiki:stable # other tags: master, <date> or <codename> user: "1000:1000" # adjust to your required user id restart: unless-stopped ports: - "8080:8080" # internal port is 8080, map to what you need environment: PHP_TIMEZONE: Europe/Berlin #PHP_MEMORYLIMIT: 256M #PHP_UPLOADLIMIT: 128M volumes: - /opt/dokuwiki/storage:/storage
It does not get much simpler than that....
Setup
https://www.dokuwiki.org/installer
After startup - Setup the installation at http://10.0.0.164:8080/install.php
Starting up
The Wiki is pretty simple to use, but has out-of-the box only a Markup editor, so I wanted a better one.
Go the the admin section:
Install an editor:
A thing to observe here is that there is not "compability" ensurance bwtween what You can see/install and the version of DokuWiki that You are running. I installed the:
and this brougt down the DokuWiki instantly, also the Admin interface - hence no uninstall
The solution was to delete the directory /opt/dokuwiki/lib/plugins/codehighlight and restart the container
Creating pages
One thing that I think is wierd is there is no "Create new page" button, You have to create a new page by creation a reference for it on another page:
Save, and the reference is there (red to show there is no page yet):
Press the link, and You will get to a new page...
Confluence migration test
Using https://www.dokuwiki.org/tips:confluence2dokuwiki -> https://github.com/mschlenstedt/confluence2dokuwiki
For my Ubuntu linux, as few pre-requisites was needed:
sudo apt-get install pandoc sudo apt-get install libtext-unidecode-perl
First I exported my space "IT" to HTML from Confluence Space Settings. And unzipped it.
Then I ran the script:
root@beetle:/home/bnp/conf# ls -l total 28 -rw-r--r-- 1 root root 12096 Jan 4 15:48 confluence2dokuwiki.pl drwxr-xr-x 5 root root 16384 Jan 4 15:49 it root@beetle:/home/bnp/conf# root@beetle:/home/bnp/conf# perl ./confluence2dokuwiki.pl it All files done. Good bye. root@beetle:/home/bnp/conf# root@beetle:/home/bnp/conf# ls -l total 76 -rw-r--r-- 1 root root 12096 Jan 4 15:48 confluence2dokuwiki.pl drwxr-xr-x 5 root root 16384 Jan 4 15:49 it -rw-r--r-- 1 root root 21423 Jan 4 17:00 linkdatabase.dat drwxr-xr-x 19 root root 20480 Jan 4 17:00 media drwxr-xr-x 24 root root 4096 Jan 4 17:00 pages root@beetle:/home/bnp/conf#
Now the "pages" and "media" directories can be copied to DokuWiki:
root@beetle:/home/bnp/conf#cp -R pages/* /opt/dokuwiki/storage/data/pages root@beetle:/home/bnp/conf#cp -R media/* /opt/dokuwiki/storage/data/media
An better altanation would be to ensure the pages was in a namespace:
root@beetle:/home/bnp/conf# mkdir /opt/dokuwiki/storage/data/pages/it root@beetle:/home/bnp/conf# mkdir /opt/dokuwiki/storage/data/media/it root@beetle:/home/bnp/conf#cp -R pages/* /opt/dokuwiki/storage/data/pages/it/ root@beetle:/home/bnp/conf#cp -R media/* /opt/dokuwiki/storage/data/media/it/
And the result - compared to Confluence:
DokuWiki | Confluence (original) |
---|---|
A sample page | A sample page (original) |
So, I works quite well, but copying the files to the root of the dokuwiki is not optimal, and should be invistigated - I would have though that the scriptsetting
# Move main pages to (sub-)namespaces with equal name # This is useful if you used confluence subpages. You main page # will then be moved to the sub-namespace. my $move_main_to_sub = 1;
Would ensure that - but I have to look into DokuWiki namespaces...