ansible-nas/roles/komga/tasks/main.yml

36 lines
1.2 KiB
YAML
Raw Normal View History

2021-12-27 23:50:05 +00:00
---
- name: Create Komga Directories
file:
path: "{{ item }}"
state: directory
# mode: 0755
with_items:
- "{{ komga_data_directory }}"
- "{{ komga_data_directory }}/config"
- name: komga Docker Container
docker_container:
name: komga
image: gotson/komga
pull: true
volumes:
- "{{ komga_comics_directory }}:/comics:ro"
- "{{ komga_data_directory }}:/data:rw"
- "{{ komga_data_directory }}/config:/config:rw"
network_mode: "bridge"
ports:
- "{{ komga_port_http }}:8080"
env:
TZ: "{{ ansible_nas_timezone }}"
PUID: "{{ komga_user_id }}"
PGID: "{{ komga_group_id }}"
restart_policy: unless-stopped
memory: "{{ komga_memory }}"
labels:
traefik.enable: "{{ komga_available_externally }}"
traefik.http.routers.komga.rule: "Host(`{{ komga_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.komga.tls.certresolver: "letsencrypt"
traefik.http.routers.komga.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.komga.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.komga.loadbalancer.server.port: "8080"