engineering:computer_science:docker:references:mprasil_dokuwiki

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
engineering:computer_science:docker:references:mprasil_dokuwiki [2024/08/16 13:56] – removed - external edit (Unknown date) 127.0.0.1engineering:computer_science:docker:references:mprasil_dokuwiki [2024/08/16 13:56] (current) – ↷ Page moved from refractor_computer_science:docker:references:mprasil_dokuwiki to engineering:computer_science:docker:references:mprasil_dokuwiki carlossousa
Line 1: Line 1:
 +====== mprasil / dokuwiki - Original Documentation ======
 +
 +Original Author: [[https://hub.docker.com/u/mprasil|https://hub.docker.com/u/mprasil]]
 +
 +Original Source: [[https://hub.docker.com/r/mprasil/dokuwiki|https://hub.docker.com/r/mprasil/dokuwiki]]
 +
 +====== DokuWiki docker container ======
 +
 +===== To run image: =====
 +<code>
 +''docker run -d -p 80:80 --name my_wiki mprasil/dokuwiki ''
 +
 +</code>
 +You can now visit the install page to configure your new DokuWiki wiki.
 +
 +For example, if you are running container locally, you can acces the page in browser by going to [[http://127.0.0.1/install.php|http://127.0.0.1/install.php]]
 +
 +==== Run with bind mounts ====
 +
 +The run command above will store your data in internal Docker volumes. If you prefer to bind mount directories on your file system, then you can use the ''-v'' parameter, for example:
 +<code>
 +''docker run -d -p 80:80 --name my_wiki \
 +    -v /data/docker/dokuwiki/data:/dokuwiki/data \
 +    -v /data/docker/dokuwiki/conf:/dokuwiki/conf \
 +    -v /data/docker/dokuwiki/lib/plugins:/dokuwiki/lib/plugins \
 +    -v /data/docker/dokuwiki/lib/tpl:/dokuwiki/lib/tpl \
 +    -v /data/docker/dokuwiki/logs:/var/log \
 +    mprasil/dokuwiki''
 +
 +</code>==== Run a specific version ====
 +
 +When running the container you can specify version to download from docker registry by using couple provided tags like //stable// which contains current stable release (this is generaly the same as //latest//) or //oldstable//. You can also use specific version like //2016-06-26a//.
 +===== To upate the image: =====
 +
 +==== With internal volumes ====
 +
 +First stop your container
 +
 +<code>''docker stop my_wiki''
 +
 +</code>
 +Then run new container just to hold the volumes
 +
 +<code>''docker run --volumes-from my_wiki --name my_wiki_data busybox true''
 +
 +</code>
 +Now you can remove old container
 +
 +<code>''docker rm my_wiki''
 +
 +</code>
 +..and run a new one (you built, pulled before)
 +
 +<code>''docker run -d -p 80:80 --name my_wiki --volumes-from my_wiki_data mprasil/dokuwiki ''
 +
 +</code>
 +afterwards you can remove data container if you want
 +
 +<code>''docker rm my_wiki_data''
 +
 +</code>
 +(or keep it for next update, takes no space anyway..)
 +
 +==== With bind mounts ====
 +
 +Just stop the old container and run the new one with the same ''-v'' mapping. Since the data is on your file system, you do not need to do anything special to preserve it between containers.
 +=== Handling changes in bundled files inside volumes ===
 +
 +**Note:** The functionality bellow is currently only supported in ''latest'', ''stable-bind'' and ''2017-02-19e-bind'' tags. This is to preserve original functionality in old images. Future releases will all support the new update system.
 +
 +If you mount a volume that has previously been used with a newer version of DokuWiki than that installed in the current contaier, the newer files will //not// be overwritten by those bundled with the current (older) version of DokuWiki. If you want to force a downgrade (at your own risk!), run the container with the ''downgrade'' command:
 +<code>''docker run ... mprasil/dokuwiki donwgrade''
 +
 +</code>
 +Additionally, if you make any changes to the files bundled with DokuWiki that are located in your volumes, these can be restored to the original version using the ''overwrite'' command:
 +<code>''docker run ... mprasil/dokuwiki overwrite''
 +
 +</code>===== Optimizing your wiki =====
 +
 +Lighttpd configuration also includes rewrites, so you can enable nice URLs in settings (Advanced -> Nice URLs, set to ".htaccess")
 +
 +For better performance enable xsendfile in settings. Set to proprietary lighttpd header (for lighttpd < 1.5)
 +
 +===== Build your own =====
 +
 +<code>''docker build -t my_dokuwiki .''
 +
 +</code>