From d91f62bf7ae2e5009daeadde80843984fff4f46d Mon Sep 17 00:00:00 2001 From: Koldo Aingeru Date: Wed, 25 Sep 2019 21:07:13 +0200 Subject: [PATCH] Bazarr support --- README.md | 3 ++- docs/applications/bazarr.md | 15 +++++++++++++ docs/configuration/application_ports.md | 1 + group_vars/all.yml.dist | 12 ++++++++++ nas.yml | 5 +++++ tasks/bazarr.yml | 30 +++++++++++++++++++++++++ templates/traefik/traefik.toml | 1 + 7 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 docs/applications/bazarr.md create mode 100644 tasks/bazarr.yml diff --git a/README.md b/README.md index d2d21568..41b8d2bb 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Ansible config and a bunch of Docker containers. * Any number of Samba shares or NFS exports for you to store your stuff * A BitTorrent client * A Usenet downloader -* Various media management tools - Sonarr, Sickchill, CouchPotato, Radarr +* Various media management tools - Sonarr, Sickchill, CouchPotato, Radarr. Bazarr * Media streaming via Plex or Emby * Music streaming with Airsonic * An RSS newsfeed reader - Miniflux @@ -29,6 +29,7 @@ Ansible config and a bunch of Docker containers. ### Docker Containers Used * [Airsonic](https://airsonic.github.io/) - catalog and stream music +* [Bazarr](https://github.com/morpheus65535/bazarr) - companion to Radarr and Sonarr for downloading subtitles * [Bitwarden_rs](https://github.com/dani-garcia/bitwarden_rs) - Self-Hosting port of password manager * [Cloudflare DDNS](https://hub.docker.com/r/joshuaavalon/cloudflare-ddns/) - automatically update Cloudflare with your IP address * [CouchPotato](https://couchpota.to/) - for downloading and managing movies diff --git a/docs/applications/bazarr.md b/docs/applications/bazarr.md new file mode 100644 index 00000000..7a86f09c --- /dev/null +++ b/docs/applications/bazarr.md @@ -0,0 +1,15 @@ +# Bazarr subtitle downloader + +Homepage: [https://github.com/morpheus65535/bazarr](https://github.com/morpheus65535/bazarr) + + +Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you. + + +## Usage + +Set `bazarr_enabled: true` in your `group_vars/all.yml` file. + +## Specific Configuration + +Follow the [Wiki](https://github.com/morpheus65535/bazarr/wiki) for conecting to Sonarr and Radarr. \ No newline at end of file diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index f0f8e848..73317cdb 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -5,6 +5,7 @@ By default, applications can be found on the ports listed below. | Application | Port | Notes | |-----------------|--------|-----------| | Couchpotato | 5050 | | +| Bazarr | 6767 | | | Bitwarden "hub" | 3012 | Web Not. | | Bitwarden | 19080 | HTTP | | Duplicati | 8200 | | diff --git a/group_vars/all.yml.dist b/group_vars/all.yml.dist index 6b316b22..4b307057 100644 --- a/group_vars/all.yml.dist +++ b/group_vars/all.yml.dist @@ -37,6 +37,8 @@ couchpotato_enabled: false radarr_enabled: false get_iplayer_enabled: false jackett_enabled: false +bazarr_enabled: false + # Music airsonic_enabled: false @@ -373,6 +375,16 @@ radarr_data_directory: "{{ docker_home }}/radarr" radarr_user_id: 0 radarr_group_id: 0 +### +### Bazarr +### +bazarr_available_externally: "false" +bazarr_data_directory: "{{ docker_home }}/bazarr/config" +bazarr_tv_directory: "{{ tv_root }}" +bazarr_movies_directory: "{{ movies_root }}" +bazarr_user_id: 0 +bazarr_group_id: 0 + ### ### Couchpotato diff --git a/nas.yml b/nas.yml index c351ca5e..5a6ce69e 100644 --- a/nas.yml +++ b/nas.yml @@ -171,3 +171,8 @@ - import_tasks: tasks/mosquitto.yml when: (mosquitto_enabled | default(False)) tags: mosquitto + + - import_tasks: tasks/bazarr.yml + when: (bazarr_enabled | default(False)) + tags: bazarr + diff --git a/tasks/bazarr.yml b/tasks/bazarr.yml new file mode 100644 index 00000000..ee8bd82a --- /dev/null +++ b/tasks/bazarr.yml @@ -0,0 +1,30 @@ +--- +- name: Create Bazarr Directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ bazarr_data_directory }}" + +- name: Bazarr + docker_container: + name: bazarr + image: linuxserver/bazarr + pull: true + volumes: + - "{{ bazarr_tv_directory }}:/tv:rw" + - "{{ bazarr_movies_directory }}:/movies:rw" + - "{{ bazarr_data_directory }}:/config:rw" + ports: + - "6767:6767" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ bazarr_user_id }}" + PGID: "{{ bazarr_group_id }}" + restart_policy: unless-stopped + memory: 1g + labels: + traefik.backend: "bazarr" + traefik.frontend.rule: "Host:bazarr.{{ ansible_nas_domain }}" + traefik.enable: "{{ bazarr_available_externally }}" + traefik.port: "6767" \ No newline at end of file diff --git a/templates/traefik/traefik.toml b/templates/traefik/traefik.toml index c22832eb..19ca4210 100644 --- a/templates/traefik/traefik.toml +++ b/templates/traefik/traefik.toml @@ -180,6 +180,7 @@ onDemand = false # create certificate when container is created # we request a certificate for everything, because why not. sans = ["airsonic.{{ ansible_nas_domain }}", + "bazarr.{{ ansible_nas_domain }}", "bitwarden.{{ ansible_nas_domain }}", "couchpotato.{{ ansible_nas_domain }}", "duplicati.{{ ansible_nas_domain }}",