Nerdy Drunk

Drunk on technology

User Tools

Site Tools


dokuwiki:docker

This is an old revision of the document!


Dokuwiki Docker

Prerequisites

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

Install

Create docker compose file

cd ~/dokuwiki
vim docker-compose.yaml
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

Visit https://SITEADDRESS:8443/install.php

Backup and Restore

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 and Update

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

Miscellaneous

Allow use of SVG images

vim ~/dokuwiki/config/dokuwiki/conf/mime.local.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


dokuwiki/docker.1658400099.txt.gz · Last modified: 2022/07/21 10:41 by 127.0.0.1