Skip to content

Deploy a DokuWiki with fake pages, namespaces, and users for testing purposes.

License

Notifications You must be signed in to change notification settings

ConX/fake-dokuwiki

Repository files navigation

Fake-DokuWiki

GitHub Issues GitHub Pull Requests GitHub stars


Deploy a DokuWiki with fake pages, namespaces, and users for testing purposes.

📝 Table of Contents

🧐 About

For some DokuWiki plugin development, it is helpful to test it against a populated wiki installation. This repository provides a DokuWiki container image with automatically generated pages, namespaces, and users.

🏁 How to use this image

By default, the fake-dokuwiki contains:

  • 100 generated pages
  • Created by a randomly selected user from a pool of 10 users
  • Placed in a randomly selecting namespace selected out of 3 namespaces or on the root

Run from the GitHub container registry

docker pull ghcr.io/conx/fake-dokuwiki:main
docker run -d --name "fake-dokuwiki" -v "${PWD}/files:/config" -p "8100:80"  ghcr.io/conx/fake-dokuwiki:main

To setup the DokuWiki once the container has started you need to go to http://<IP-ADDRESS>:<PORT>/install.php to configure your install then restart your container when finished to remove install.php

If you wish to generate more pages/namespaces/users you can use the following command:

docker exec -it fake-dokuwiki php /app/dokuwiki/bin/gen-fake-wiki.php -u <number of new users> -p <number of new pages> -n <number of new namespaces>

Build and run from source

Configuration

To modify the default number of pages, namespaces, and/or users, you will need to edit the Dockerfile or the docker-compose.yml depending on your selected deployment method. Alternatively, you can use the command line arguments on both tools to achieve the same.

Using docker

To build and run the fake-dokuwiki image using docker run the following:

mkdir files
docker build . -t fake-dokuwiki
docker run -d --name "fake-dokuwiki" -v "${PWD}/files:/config" -p "8100:80"  fake-dokuwiki

Using docker-compose

To build and run the fake-dokuwiki image using docker-compose run the following:

docker-compose up -d

🎉 Acknowledgements

  • @michitux: For the idea to use the existing CLI plugins to generate the fake pages/users/namespaces
  • @splitbrain: For the dwpage CLI plugin script based on which the gen-fake-wiki.php was created
  • linuxserver.io: For providing the base image for this project
  • FakerPHP: For the excellent PHP library that powers the generation of fake data for this project

About

Deploy a DokuWiki with fake pages, namespaces, and users for testing purposes.

Topics

Resources

License

Stars

Watchers

Forks

Packages