diff --git a/README.md b/README.md index 39fbd593..d4a6a664 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ Ansible config and a bunch of Docker containers. * [Cloudflare DDNS](https://hub.docker.com/r/joshuaavalon/cloudflare-ddns/) - automatically update Cloudflare with your IP address * [CouchPotato](https://couchpota.to/) - for downloading and managing movies * [Deluge](https://dev.deluge-torrent.org/) - A lightweight, Free Software, cross-platform BitTorrent client. +* [DokuWiki](https://www.dokuwiki.org/) - A simple to use and highly versatile Open Source wiki software that doesn't require a database. * [Duplicati](https://www.duplicati.com/) - for backing up your stuff * [Emby](https://emby.media/) - Media streaming and management * [Firefly III](https://firefly-iii.org/) - Free and open source personal finance manager diff --git a/docs/applications/dokuwiki.md b/docs/applications/dokuwiki.md new file mode 100644 index 00000000..413ef934 --- /dev/null +++ b/docs/applications/dokuwiki.md @@ -0,0 +1,11 @@ +# DokuWiki + +Homepage: [https://www.dokuwiki.org/](https://www.dokuwiki.org/) + +DokuWiki is a simple to use and highly versatile Open Source wiki software that doesn't require a database. It is loved by users for its clean and readable syntax. The ease of maintenance, backup and integration makes it an administrator's favorite. Built in access controls and authentication connectors make DokuWiki especially useful in the enterprise context and the large number of plugins contributed by its vibrant community allow for a broad range of use cases beyond a traditional wiki. + +## Usage + +Set `dokuwiki_enabled: true` in your `inventories//nas.yml` file. + +The DokuWiki web interface can be found at http://ansible_nas_host_or_ip:8085. diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index 4579588f..2944a814 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -11,6 +11,7 @@ By default, applications can be found on the ports listed below. | Calibre-web | 8084 | Bridge | HTTP | | Cloud Commander | 7373 | Bridge | HTTP | | Couchpotato | 5050 | Bridge | HTTP | +| DokuWiki | 8085 | Bridge | HTTP | | Duplicati | 8200 | Bridge | HTTP | | Emby | 8096 | Bridge | HTTP | | Emby | 8096 | Bridge | HTTP | diff --git a/nas.yml b/nas.yml index 9765d3ca..c4427f66 100644 --- a/nas.yml +++ b/nas.yml @@ -268,6 +268,11 @@ - znc when: (znc_enabled | default(False)) + - role: dokuwiki + tags: + - dokuwiki + when: (dokuwiki_enabled | default(False)) + tasks: - import_tasks: tasks/thelounge.yml when: (thelounge_enabled | default(False)) diff --git a/roles/dokuwiki/defaults/main.yml b/roles/dokuwiki/defaults/main.yml new file mode 100644 index 00000000..3cad17fb --- /dev/null +++ b/roles/dokuwiki/defaults/main.yml @@ -0,0 +1,17 @@ +--- +dokuwiki_enabled: false +dokuwiki_available_externally: "false" + +# directories +dokuwiki_data_directory: "{{ docker_home }}/dokuwiki" + +# uid / gid +dokuwiki_user_id: "1000" +dokuwiki_group_id: "1000" + +# network +dokuwiki_hostname: "dokuwiki" +dokuwiki_port: "8085" + +# specs +dokuwiki_memory: 1g diff --git a/roles/dokuwiki/tasks/main.yml b/roles/dokuwiki/tasks/main.yml new file mode 100644 index 00000000..6e789f69 --- /dev/null +++ b/roles/dokuwiki/tasks/main.yml @@ -0,0 +1,30 @@ +--- +- name: Create DokuWiki Directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ dokuwiki_data_directory }}/data" + +- name: DokuWiki Docker Container + docker_container: + name: dokuwiki + image: linuxserver/dokuwiki:latest + pull: true + volumes: + - "{{ dokuwiki_data_directory }}:/config/dokuwiki/data:rw" + ports: + - "{{ dokuwiki_port }}:80" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ dokuwiki_user_id }}" + PGID: "{{ dokuwiki_group_id }}" + restart_policy: unless-stopped + memory: "{{ dokuwiki_memory }}" + labels: + traefik.enable: "{{ dokuwiki_available_externally }}" + traefik.http.routers.dokuwiki.rule: "Host(`{{ dokuwiki_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.dokuwiki.tls.certresolver: "letsencrypt" + traefik.http.routers.dokuwiki.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.dokuwiki.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.dokuwiki.loadbalancer.server.port: "80"