Prerequisites - Ubuntu
sudo apt update sudo apt -y upgrade sudo apt -y install docker.io docker-compose sudo usermod -aG docker $USER sudo reboot mkdir dokuwiki cd dokuwiki mkdir config
Create docker compose file
cd ~/dokuwiki vim docker-compose.yaml
---
version: "2.1"
services:
dokuwiki:
image: lscr.io/linuxserver/dokuwiki:latest
container_name: dokuwiki
environment:
- PUID=1001
- PGID=1001
- TZ=Etc/UTC
volumes:
- /home/ubuntu/dokuwiki/config:/config
ports:
- 8080:80
- 8443:443 #optional
restart: unless-stopped
Install Static Image
cd ~/dokuwiki sudo docker-compose pull sudo docker-compose up -d
Copy the following from backup file
| Backup | New Container |
|---|---|
| dokuwiki/data/media/ | ~/dokuwiki/config/dokuwiki/data/media/ |
| dokuwiki/data/pages/ | ~/dokuwiki/config/dokuwiki/data/pages/ |
Use the Searchindex Manager plugin to re-index pages.
Stop
cd ~/dokuwiki docker-compose down
Update Static Image
cd ~/dokuwiki docker-compose down docker-compose rm docker-compose pull docker-compose up --build -d
Allow use of SVG images
vim ~/dokuwiki/config/dokuwiki/conf/mime.local.conf
svg image/svg+xml
If using the Tag plugin, install the Searchindex Manager plugin and use to re-index.
Enable nice URLs by using Configuration Manager - Advanced to set Use Nice URLs to .htaccess.
Widen page by using Template Style Settings to set The width of the full site (can be any length unit: %, px, em, …) to 96em
Update logo by replacing file located at wiki:dokuwiki-128.png then run
cp ~/dokuwiki/config/dokuwiki/data/media/wiki/dokuwiki-128.png ~/dokuwiki/config/dokuwiki/lib/tpl/dokuwiki/images/logo.png
Update favicon by uploading file to wiki:favicon.ico
If running behind a load balancer configure logging by editing ~/dokuwiki/config/nginx/nginx.conf and add/update the following.
http {
##
# Logging Settings
##
log_format combined_realip '$http_x_forwarded_for - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
#access_log /config/log/nginx/access.log;
access_log /config/log/nginx/access.log combined_realip;
}