Dokuwiki
Main Dokuwiki Page
Dokuwiki Container
This uses the linuxserver.io image from dockerhub, linuxserver/dokuwiki. The Linuxserver.io documents can be found heredoc.linuxserver.io.
Defines web_data volume:
#Not USED
docker volume create --driver local \
--opt type=none \
--opt device="/home/docker_store/cloud.kptree.net/data" \
--opt o=bind cloud_data
docker.yaml
---
services:
dokuwiki:
image: lscr.io/linuxserver/dokuwiki:latest
container_name: wiki
environment:
- PUID=33
- PGID=33
- TZ=Australia/Perth
volumes:
- /home/docker_store/wiki.kptree.net/config:/config
ports:
- 8081:80
# - 443:443 #optional
restart: unless-stopped
Todo
Need to create a local
LAN only functional back-up of the wiki in my back-up server so I have a backup in case the main wiki with my configuration notes becomes unavailable.
Backup
backup server
This wiki is used to help setup and maintain my home servers / lab, so if the server becomes unavailable it can become difficult to maintain the lab servers. Hence this wiki is installed on 2 servers, the main one with a public facing web page and a duplicated back-up on a local only facing web page. I only intermittantly copy the contents to the backup server. The following is the back up script.
backup wiki data
Some of the following nuances may help when transferring Dokuwiki servers:
wiki_to_local.wiki_copy.sh
#!/bin/bash
# script to copy main wiki to local wiki
#cp flags: -r => recurse (into sub-directories), -p= maintain source metadata.
#s_d => source directory
s_d="/mnt/docker_store/router_backup/wiki/config/dokuwiki/"
#d_d => destination directory
d_d="/mnt/docker_store/wiki/config/dokuwiki/"
#sub_d => sub-directory, see list of sub directories above to be copied.
sub_d="conf"
rm -r $d_d$sub_d
cp -rp $s_d$sub_d $d_d$sub_d
sub_d="data"
rm -r $d_d$sub_d
cp -rp $s_d$sub_d $d_d$sub_d
sub_d="lib"
rm -r $d_d$sub_d
cp -rp $s_d$sub_d $d_d$sub_d
To use: sudo bash wiki_to_local.wiki_copy.sh
The DokuWiki page How to backup DokuWiki? has the basic information to backup a Dokuwiki.
After setting up the internal indexes could be messed up. The plugin SearchIndex Manager can be used to recreate these indexes.
php/php-fpm settings
php /php-fpm overrides are in the config/php directory. The files in this directory can be used to set php.ini and www.conf override settings. I followed the direction for php settings from dokuwiki. I use my preferred settings for php-fpm. (I appreciate that dokuwiki does not need a lot of resources, however I do not want performance to be resource limited. Many of the setting are maximum allowances, an do not use resources unless needed.)
conf/php/php-local.ini
; Edit this file to override php.ini directives and restart the container
date.timezone = Australia/Perth
upload_max_filesize = 100M
post_max_size = 100M
;recommendation from https://www.dokuwiki.org/install:php PHP configuration for Douwiki
memory_limit = 256M
implicit_flush = off
max_execution_time = 30
max_input_time = 60
max_input_vars = 10000
variables_order = "EGPCS"
register_argc_argv = off
conf/php/www2.conf
; Edit this file to override www.conf and php-fpm.conf directives and restart the container
; Pool name
[www]
pm.max_children = 50
pm.max_spare_servers = 5
I noticed a few days after implementing these changes the Wiki response had improved. The page updates seemed much faster.
Dokuwiki links
Dokuwiki defaults to opening all links in the same page. I prefer external links the be opened in a new tab. The option can be set under admin/configuration/Link Settings/extern. Set to _tab for external links to open in new tab. See Configuring DokuWiki and Configuration Setting: target.