ansible-nas/tasks/dokuwiki.yml

27 lines
945 B
YAML
Raw Normal View History

2021-02-28 17:29:08 +00:00
---
- 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"
restart_policy: unless-stopped
memory: 1g
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: "{{ dokuwiki_port }}"