This setup was created to make development around DokuWiki easier and more maintainable. Just fork the original repo splitbrain/dokuwiki and start playing around 🚀
- Make sure you have docker & docker-compose set-up.
- Add
127.0.0.1 dokuwiki.local
in your /etc/hosts.
ℹ This is optional - you can customize the hostname in server/dokuwiki.conf - Create an .env file and set up environmental variables accordingly.
⤷cp .env.example .env
Go to /install.php and perform the standard DokuWiki install process.
ℹ Before running any tests, you should fetch PHPUnit
(DokuWiki - Unit Testing). You can do it by:
docker-compose exec app bash -c 'cd _test; php fetchphpunit.php'
-
To run all tests:
docker-compose exec app bash -c 'cd _test; php phpunit.phar'
-
To run just a single file test:
docker-compose exec app bash -c 'cd _test; php phpunit.phar tests/inc/input.test.php'
Accordingly, to the original documentation, you should be able to cover all other cases.
🚧 🚧 🚧
ℹ Before running any code style checks, you should fetch PHP_CodeSniffer. You can do it by:
docker-compose exec app bash -c 'cd _test; wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar'
docker-compose exec app bash -c 'cd _test; wget https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar'
⚠ These two files will be recognised by git as new files by default in the original (forked) repo. You can locally ignore them by adding their paths to .git/info/exclude.
-
To check a single file:
docker-compose exec app bash -c 'cd _test; php phpcs.phar ../feed.php'
-
To try fixing it:
docker-compose exec app bash -c 'cd _test; php phpcbf.phar ../feed.php'
Additional commands were added for easier DokiWiki handling:
- Reinstall DokuWiki (without loosing data)
make reinstall