mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-13 03:58:47 +00:00
35 lines
1.3 KiB
YAML
35 lines
1.3 KiB
YAML
---
|
|
- name: Create Booksonic Directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: 0755
|
|
with_items:
|
|
- "{{ booksonic_data_directory }}/data"
|
|
- "{{ booksonic_data_directory }}/playlists"
|
|
|
|
- name: Booksonic Docker Container
|
|
docker_container:
|
|
name: booksonic
|
|
image: linuxserver/booksonic-air:latest
|
|
pull: true
|
|
volumes:
|
|
- "{{ booksonic_data_directory }}/data:/booksonic/data:rw"
|
|
- "{{ booksonic_data_directory }}/playlists:/booksonic/playlists:rw"
|
|
- "{{ booksonic_audiobooks_directory }}:/booksonic/audiobooks:rw"
|
|
- "{{ booksonic_podcasts_directory }}:/booksonic/podcasts:rw"
|
|
ports:
|
|
- "{{ booksonic_port }}:4040"
|
|
env:
|
|
TZ: "{{ ansible_nas_timezone }}"
|
|
PUID: "{{ booksonic_user_id }}"
|
|
PGID: "{{ booksonic_group_id }}"
|
|
restart_policy: unless-stopped
|
|
memory: "{{ booksonic_memory }}"
|
|
labels:
|
|
traefik.enable: "{{ booksonic_available_externally }}"
|
|
traefik.http.routers.booksonic.rule: "Host(`{{ booksonic_hostname }}.{{ ansible_nas_domain }}`)"
|
|
traefik.http.routers.booksonic.tls.certresolver: "letsencrypt"
|
|
traefik.http.routers.booksonic.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
traefik.http.routers.booksonic.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
traefik.http.services.booksonic.loadbalancer.server.port: "4040"
|