Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD: Readarr - an ebook collection manager for Usenet and BitTorrent users #580

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ If you have a spare domain name you can configure applications to be accessible
* [pyLoad](https://pyload.net/) - A download manager with a friendly web-interface
* [PyTivo](http://pytivo.org) - An HMO and GoBack server for TiVos.
* [Radarr](https://radarr.video/) - for organising and downloading movies
* [Readarr](https://readarr.com/) - an ebook collection manager for Usenet and BitTorrent users
* [Route53 DDNS](https://crazymax.dev/ddns-route53/) - Automatically update AWS Route53 with your IP address
* [RSS-Bridge](https://rss-bridge.github.io/rss-bridge/) - The RSS feed for websites missing it
* [Sabnzbd](https://sabnzbd.org/) - A powerful usenet downloader that FreeNAS provides
Expand Down
10 changes: 10 additions & 0 deletions docs/applications/readarr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Readarr

Homepage: <https://readarr.com/>
Readarr is a ebook collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new books from your favorite authors and will interface with clients and indexers to grab, sort, and rename them.

## Usage

Set `readarr_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.

The Readarr web interface can be found at <http://ansible_nas_host_or_ip:8787>.
1 change: 1 addition & 0 deletions docs/configuration/application_ports.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ By default, applications can be found on the ports listed below.
| PyTivo | 9032 | Bridge | HTTP |
| PyTivo | 2190 | Bridge | UDP |
| Radarr | 7878 | Bridge | HTTP |
| Readarr | 8787 | Bridge | HTTP |
| RSS-Bridge | 8091 | Bridge | HTTP |
| Sabnzbd | 18080 | Bridge | HTTP |
| Sickchill | 8081 | Bridge | HTTP |
Expand Down
5 changes: 5 additions & 0 deletions nas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@
- radarr
when: (radarr_enabled | default(False))

- role: readarr
tags:
- readarr
when: (readarr_enabled | default(False))

- role: sabnzbd
tags:
- sabnzbd
Expand Down
18 changes: 18 additions & 0 deletions roles/readarr/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# enable or disable the application
readarr_enabled: false
readarr_available_externally: false

# directories
readarr_data_directory: "{{ docker_home }}/readarr"
readarr_download_directory: "{{ downloads_root }}"

# uid / gid
readarr_user_id: "998"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this uid / gid come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. 998 is my ansible-nas user. I'll have to go test and figure out why I choose that long ago. Probably should be 1000 if 0 doesn't work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to use root like all the other *arr linuxserver app defaults

readarr_group_id: "1001"
# network
readarr_hostname: "readarr"
readarr_port: "8787"

# specs
readarr_memory: "1g"
33 changes: 33 additions & 0 deletions roles/readarr/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
- name: Create Readarr Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ readarr_data_directory }}"
- "{{ readarr_data_directory }}/config"

- name: Create Readarr Docker Container
docker_container:
name: readarr
image: linuxserver/readarr:nightly
davestephens marked this conversation as resolved.
Show resolved Hide resolved
pull: true
volumes:
- "{{ readarr_data_directory }}/config:/config"
- "{{ books_root }}:/books"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please abstract this the same as readarr_downloads_root

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

- "{{ readarr_download_directory }}:/downloads:rw"
env:
TZ: "{{ ansible_nas_timezone }}"
PUID: "{{ readarr_user_id }}"
PGID: "{{ readarr_group_id }}"
ports:
- "{{ readarr_port }}:8787"
restart_policy: unless-stopped
labels:
traefik.enable: "{{ readarr_available_externally | string }}"
traefik.http.routers.readarr.rule: "Host(`{{ readarr_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.readarr.tls.certresolver: "letsencrypt"
traefik.http.routers.readarr.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.readarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.readarr.loadbalancer.server.port: "8787"
memory: "{{ readarr_memory }}"