2021-02-21 19:50:07 +00:00
|
|
|
---
|
2020-04-26 01:21:12 +00:00
|
|
|
- name: Create Calibre-web Directories
|
2019-08-31 21:10:51 +00:00
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- "{{ calibre_data_directory }}/config"
|
2019-10-13 21:33:25 +00:00
|
|
|
|
2020-04-26 01:21:12 +00:00
|
|
|
- name: Calibre-web Docker Container
|
2019-08-31 21:10:51 +00:00
|
|
|
docker_container:
|
|
|
|
name: calibre
|
|
|
|
image: linuxserver/calibre-web:latest
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ calibre_data_directory }}/config:/config"
|
2020-01-07 22:57:02 +00:00
|
|
|
- "{{ calibre_books_root }}:/books"
|
2019-08-31 21:10:51 +00:00
|
|
|
env:
|
|
|
|
TZ: "{{ ansible_nas_timezone }}"
|
|
|
|
PUID: "{{ calibre_user_id }}"
|
|
|
|
PGID: "{{ calibre_group_id }}"
|
|
|
|
DOCKER_MODS: "{{ calibre_ebook_conversion }}"
|
|
|
|
ports:
|
2020-01-05 21:47:40 +00:00
|
|
|
- "{{ calibre_port }}:8083"
|
2019-08-31 21:10:51 +00:00
|
|
|
restart_policy: unless-stopped
|
2021-01-19 23:51:59 +00:00
|
|
|
memory: 1g
|
2019-08-31 21:10:51 +00:00
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ calibre_available_externally }}"
|
2021-01-19 23:51:59 +00:00
|
|
|
traefik.http.routers.calibre.rule: "Host(`calibre.{{ ansible_nas_domain }}`)"
|
|
|
|
traefik.http.routers.calibre.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.calibre.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.calibre.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.services.calibre.loadbalancer.server.port: "8083"
|