2022-06-18 19:41:25 +00:00
|
|
|
---
|
|
|
|
- name: Create Tiddlywiki Directory
|
|
|
|
file:
|
|
|
|
path: "{{ tiddlywiki_data_directory }}"
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: Create Tiddlywiki Container
|
|
|
|
docker_container:
|
|
|
|
name: tiddlywiki
|
|
|
|
image: wmudge/tiddlywiki:latest
|
|
|
|
ports:
|
|
|
|
- "{{ tiddlywiki_port }}:8080"
|
|
|
|
volumes:
|
|
|
|
- "{{ tiddlywiki_data_directory }}:/var/lib/tiddlywiki"
|
|
|
|
env:
|
|
|
|
NODE_MEM: "{{ tiddlywiki_node_memory | default(omit) }}"
|
|
|
|
USERNAME: "{{ tiddlywiki_username | default(omit) }}"
|
|
|
|
PASSWORD: "{{ tiddlywiki_password | default(omit) }}"
|
|
|
|
DEBUG: "{{ tiddlywiki_debug_level | default(omit) }}"
|
|
|
|
pull: true
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: "{{ tiddlywiki_memory }}"
|
|
|
|
labels:
|
2022-07-23 15:40:36 +00:00
|
|
|
traefik.enable: "{{ tiddlywiki_available_externally | string }}"
|
2022-06-18 19:41:25 +00:00
|
|
|
traefik.http.routers.tiddlywiki.rule: "Host(`{{ tiddlywiki_hostname }}.{{ ansible_nas_domain }}`)"
|
|
|
|
traefik.http.routers.tiddlywiki.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.tiddlywiki.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.tiddlywiki.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.services.tiddlywiki.loadbalancer.server.port: "8080"
|