Skip to content

Docker instructions

Eduardo Fernandes edited this page Oct 20, 2019 · 5 revisions

You can use Docker to run the wiki!

First thing, create your .env file.

You can set the port where you want to use Wikitten by changing the HTTP_PORT and use another library folder by changing LIBRARY_FOLDER.

The LIBRARY_FOLDER will be mounted by docker-composer in /var/www/html/library.

$ cp docker/.env.example docker/.env
$ cat docker/.env
HTTP_PORT=9000
LIBRARY_FOLDER=../library

Remember that docker-composer will mount the LIBRARY in /var/www/html/library, make sure your config.php reflect that or has the LIBRARY line commented.

// define('LIBRARY', '/path/to/wiki/library');

Build the images and run the container.

cd Wikitten/docker
sudo docker-compose build --force-rm --no-cache
sudo docker-compose up --detach --force-recreate --remove-orphans'

With these commands docker and docker-compose will:

  • Create a wikitten image based on docker/Dockerfile.
  • Start a wikitten container and
    • mount the Wikitten folder to the container's /var/www/html folder;
    • mount the LIBRARY folder to the container's /var/www/html/library folder;
    • mount the docker/logs folder to the container's /var/log/apache2 folder;

Wikitten will be then available at http://localhost:9000.

This will stop you having to run the above commands and just run a single one:

docker-compose up

You will have to have Docker and docker-compose installed