mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-13 03:58:47 +00:00
36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
---
|
|
- 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_books_directory }}:/books: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"
|