June
f16f8697c2
Because of how Ansible local relative search paths work, the global "files" and "templates" directories need to be next to the playbooks. However its not intuitive to look into the "playbooks" directory to find the files and templates for a host. Therefore move them out of the "playbooks" directory into the root directory and add symlinks so everything still works. Similarly for local roles, they also need to be next to the playbooks. So for a nicer structure, move the "roles" directory out into the root directory as well and add a symlink so everything still works. Also see: https://docs.ansible.com/ansible/latest/playbook_guide/playbook_pathing.html#resolving-local-relative-paths https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.html#storing-and-finding-roles
49 lines
1.4 KiB
Markdown
49 lines
1.4 KiB
Markdown
# Role `dokuwiki`
|
|
|
|
Makes sure that all required packages for a [DokuWiki](https://www.dokuwiki.org/dokuwiki) powered by php-fpm are installed.
|
|
|
|
The DokuWiki tarball has to be unpacked to `/var/www/dokuwiki` (see variable below) manually afterwards.
|
|
Please download it from https://download.dokuwiki.org.
|
|
|
|
## Supported Distributions
|
|
|
|
The following distributions are supported:
|
|
|
|
- Debian 11
|
|
|
|
## Required Arguments
|
|
|
|
None.
|
|
|
|
## Optional Argument
|
|
|
|
- `dokuwiki__installpath`: Where your DokiWiki lives, default `/var/www/dokuwiki`
|
|
- `dokuwiki__php_version`: Your PHP version, default `7.4`
|
|
- `dokuwiki__php_user`: User of your php-fpm process, default `www-data`
|
|
- `dokuwiki__nginx_user`: User of your nginx process, default `nginx`
|
|
|
|
## nginx Configuration
|
|
|
|
This role does not configure your nginx server.
|
|
Please take a look at https://www.dokuwiki.org/install:nginx for a starting point.
|
|
|
|
This role expects to work with our `nginx` role, which installs nginx from nginx's repo instead of Debian's package.
|
|
This means, that nginx will not run as the `www-data`, which is used by php-fpm.
|
|
|
|
So your `server` directive in the nginx configuration needs to use:
|
|
```conf
|
|
root /var/www/dokuwiki;
|
|
|
|
[...]
|
|
|
|
location ~ \.php$ {
|
|
[...]
|
|
fastcgi_pass unix:/var/run/php/php-fpm-dokuwiki.sock;
|
|
}
|
|
```
|
|
|
|
|
|
## Updates
|
|
|
|
This role doesn't handle updates.
|
|
Please use the updater from Dokuwiki's admin interface to install updates.
|