User Tools

Site Tools


dokuwiki:docker:setup_using_docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dokuwiki:docker:setup_using_docker [2023/02/19 19:06] – external edit 127.0.0.1dokuwiki:docker:setup_using_docker [2023/07/08 01:42] (current) admin
Line 5: Line 5:
 * use an SMB share for storing the data * use an SMB share for storing the data
 * on a server using enforcing SELinux (Centos 7) * on a server using enforcing SELinux (Centos 7)
 +
 +## Mount the data on an SMB share
 +
 +Add something similar to this to your `/etc/fstab`:
 +
 +```fstab
 +//vmhost/dokumente/dokuwiki     /home/<user>/dokuwiki-data      cifs  credentials=/root/.cifs,vers=3.0,uid=1000,gid=1000,context=system_u:object_r:container_file_t:s0,noexec,nosuid  0 0
 +```
 +
 +_Note_: on an SELinux enabled system you need the set the SEContext correctly (as in exactly what you see in a directory that works in a container with `ls -lZ`)
 +
 +The credentials can be stored in a file only root can read. Use the highest number for vers possible, it maybe even better to use the `smb3` filesystem with `posix` in newer versions of Linux.
 +
 +```bash
 +sudo mount $(pwd)/dokuwiki-data
 +```
  
 ## Create the container and managing lifecycle via docker ## Create the container and managing lifecycle via docker
  
-We use an "official" container image:+We use an "official" container image, `$(pwd)` is meant to run from <user> home directory:
  
 ```bash ```bash
-sudo docker run -d   --name=dokuwiki   -e PUID=1000   -e PGID=1000   -e TZ=Europe/Vienna   -p 50080:80   -p 50443:443   -v $(pwd)/dokuwiki:/config -v $(pwd)/dokuwiki/dokuwiki/data:/config/dokuwiki/data  --restart unless-stopped   lscr.io/linuxserver/dokuwiki:latest+sudo docker run -d 
 +  --name=dokuwiki 
 +  -e PUID=1000 
 +  -e PGID=1000 
 +  -e TZ=Europe/Vienna 
 +  -p 50080:80 
 +  -p 50443:443 
 +  -v $(pwd)/dokuwiki:/config:z -v $(pwd)/dokuwiki-data:/data 
 +  --restart unless-stopped 
 +  lscr.io/linuxserver/dokuwiki:latest 
 +``` 
 + 
 +This image stores all configuration in /config and all data in /data. 
 +We want to keep config local but mount data from some SMB server. Change the following in `~/dokuwiki/dokuwiki/conf/local.php` 
 + 
 +```php 
 +$conf['savedir'] = '/data';
 ``` ```
  
Line 32: Line 64:
  
   Include /etc/httpd/conf.d/shared/ssl.conf   Include /etc/httpd/conf.d/shared/ssl.conf
- ######################################## 
- 
- # Reverse proxy for Collabora Online 
- # 
- 
- ######################################## 
  
  
Line 57: Line 83:
 ``` ```
  
-# Add the new virtual host to Let's encrypt+## Add the new virtual host to Let's encrypt
  
 ```bash ```bash
Line 64: Line 90:
 sudo docker run -it --rm --name certbot \ sudo docker run -it --rm --name certbot \
             -v "/etc/letsencrypt:/etc/letsencrypt" \             -v "/etc/letsencrypt:/etc/letsencrypt" \
-            -            -v "/var/lib/letsencrypt:/var/lib/letsencrypt" -v "/var/log/letsencrypt/:/var/log/letsencrypt/"             -p 80:80 -p 443:443             certbot/certbot certonly --standalone -d www.siam.homeunix.net,basex.siam.homeunix.net,exist.siam.homeunix.net,git.siam.homeunix.net,office.siam.homeunix.net,vleserver.siam.homeunix.net,registry.siam.homeunix.net,service-portal.siam.homeunix.net,dokuwiki.siam.homeunix.net+            -v "/var/lib/letsencrypt:/var/lib/letsencrypt" -v "/var/log/letsencrypt/:/var/log/letsencrypt/" 
 +            -p 80:80 -p 443:443 
 +            certbot/certbot certonly --standalone -d [... the other letsencrypt domains],dokuwiki.machine-deck.jeffries-tube.at
 systemctl start httpd systemctl start httpd
 setenforce 1 setenforce 1
 +```
  
dokuwiki/docker/setup_using_docker.1676829979.txt.gz · Last modified: by 127.0.0.1