Skip to content

Commit

Permalink
Merge pull request #96 from ahembree/add-containers
Browse files Browse the repository at this point in the history
Add containers
  • Loading branch information
ahembree committed Aug 24, 2024
2 parents a846944 + 2d68f19 commit da304a0
Show file tree
Hide file tree
Showing 28 changed files with 1,101 additions and 128 deletions.
76 changes: 75 additions & 1 deletion .github/extra-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,80 @@
"expose_to_public": false,
"homepage": true,
"homepage_stats": false
}
},
"maintainerr": {
"enabled": true,
"proxy_host_rule": "maintainerr",
"directory": true,
"traefik": true,
"authentik": false,
"authentik_provider_type": "proxy",
"expose_to_public": false,
},
"unpackerr": {
"enabled": true,
"proxy_host_rule": "unpackerr",
"directory": true,
"traefik": true,
"authentik": false,
"authentik_provider_type": "proxy",
"expose_to_public": false,
},
"lidarr": {
"enabled": true,
"proxy_host_rule": "lidarr",
"directory": true,
"traefik": true,
"authentik": false,
"authentik_provider_type": "proxy",
"expose_to_public": false,
"homepage": true,
"homepage_stats": false
},
"autobrr": {
"enabled": true,
"proxy_host_rule": "autobrr",
"directory": true,
"traefik": true,
"authentik": false,
"authentik_provider_type": "proxy",
"expose_to_public": false,
"homepage": true,
"homepage_stats": false
},
"speedtest-tracker": {
"enabled": true,
"proxy_host_rule": "speedtest",
"directory": true,
"traefik": true,
"authentik": false,
"authentik_provider_type": "proxy",
"expose_to_public": false,
},
"recyclarr": {
"enabled": true,
"directory": true,
},
"tinymediamanager": {
"enabled": true,
"proxy_host_rule": "tmm",
"directory": true,
"traefik": true,
"authentik": false,
"authentik_provider_type": "proxy",
"expose_to_public": false,
},
"pasta": {
"enabled": true,
"proxy_host_rule": "pasta",
"directory": true,
"traefik": true,
"authentik": false,
"authentik_provider_type": "proxy",
"expose_to_public": false,
},
"netdata": {
"enabled": true
},
}
}
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ Ansible Playbook to setup an automated Home Media Server stack running on Docker

- [Sonarr](https://github.com/Sonarr/Sonarr): tv series management
- [Radarr](https://github.com/Radarr/Radarr): movie management
- [Lidarr](https://github.com/Lidarr/Lidarr): music management
- [Bazarr](https://github.com/morpheus65535/bazarr): subtitle management
- [Prowlarr](https://github.com/Prowlarr/Prowlarr): tracker management
- [Readarr](https://github.com/Readarr/Readarr): ebook management
- [Overseerr](https://github.com/sct/overseerr): request platform
- [Requestrr](https://github.com/thomst08/requestrr): chat client for requests
- [Calibre](https://github.com/linuxserver/docker-calibre): ebook management
- [Tdarr](https://github.com/HaveAGitGat/Tdarr): media transcoding
- [Maintainerr](https://github.com/jorenn92/Maintainerr): media management
- [tinyMediaManager](https://gitlab.com/tinyMediaManager/tinyMediaManager): media management

### Download Clients

Expand All @@ -62,10 +65,18 @@ Ansible Playbook to setup an automated Home Media Server stack running on Docker

- [Portainer](https://hub.docker.com/r/portainer/portainer): container management GUI
- [Watchtower](https://github.com/containrrr/watchtower): automatic container updates (if enabled)
- [Authentik](https://github.com/goauthentik/authentik): SSO
- [Authentik](https://github.com/goauthentik/authentik): SSO (Single Sign-On)
- [Flaresolverr](https://github.com/FlareSolverr/FlareSolverr): CAPTCHA solving
- [Uptime Kuma](https://github.com/louislam/uptime-kuma): service status monitoring
- [Kavita](https://hub.docker.com/r/kizaing/kavita): digital library
- [Unpackerr](https://github.com/Unpackerr/unpackerr): download decompression
- [Autobrr](https://github.com/autobrr/autobrr): torrent automation
- [Notifiarr](https://github.com/Notifiarr/notifiarr): notification system
- [Speedtest-Tracker](https://github.com/alexjustesen/speedtest-tracker): notification system
- [Recyclarr](https://github.com/recyclarr/recyclarr): auto-sync for [TRaSH guides](https://trash-guides.info/)
- [PASTA](https://github.com/cglatot/pasta): audio and subtitle management
- [Netdata](https://github.com/netdata/netdata): observability


## Other Features

Expand Down
11 changes: 9 additions & 2 deletions docs/Container Map.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ If you choose to expose the container ports on the host (by setting `container_e
| Readarr | ☐ | `readarr` | `8787` | `8787` | ☑ |
| Kavita | ☐ | `kavita` | `5000` | `5000` | ☑ |
| Calibre | ☐ | `calibre` | `8083`, `8182`, `8084` | `8080`, `8181`, `8081`| ☑ |
| Jellyfin | ☐ | `Jellyfin` | `8096`, `8920`, `7359`, `1900` | `8096`, `8920`, `7359`, `1900` | ☑ |
| Emby | ☐ | `Emby` | `8096`, `8920` | `8096`, `8920`| ☑ |
| Jellyfin | ☐ | `jellyfin` | `8096`, `8920`, `7359`, `1900` | `8096`, `8920`, `7359`, `1900` | ☑ |
| Emby | ☐ | `emby` | `8096`, `8920` | `8096`, `8920` | ☑ |
| Maintainerr | ☐ | `maintainerr` | `6246` | `6246` | ☑ |
| Lidarr | ☐ | `lidarr` | `8686` | `8686` | ☑ |
| Autobrr | ☐ | `autobrr` | `7474` | `7474` | ☑ |
| Notifiarr | ☐ | `notifiarr` | `5454` | `5454` | ☑ |
| Speedtest-Tracker | ☐ | `speedtest` | `8090`, `8444` | `8080`, `8443` | ☑ |
| tinyMediaManager | ☐ | `tmm` | `5900`, `4000` | `5900`, `4000` | ☑ |
| PASTA | ☐ | `pasta` | `8085` | `80` | ☑ |

If both Jellyfin and Emby are enabled, then Emby will be available on ports `8097` and `8921` (if ports are being exposed for both)
23 changes: 23 additions & 0 deletions docs/Netdata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Netdata Container

To claim your Netdata node when prompted in the console, run this command:

```bash
docker exec -it netdata cat /var/lib/netdata/netdata_random_session_id
```

Since Netdata uses the `host` network mode, it cannot be connected to Traefik via the Docker internal network which results in it not being "auto-discovered" by Traefik.

Instead, you will have to treat it as an "external service" to Traefik. Using the advanced configuration and in `inventory/group_vars/all/traefik.yml`, set `traefik_ext_hosts_enabled` to `yes` and uncomment the lines in `traefik_ext_hosts_list` that are related to Netdata (like below):

```yml
...
{
friendly_name: netdata,
subdomain_name: netdata,
backend_url: "http://netdata.{{ hms_docker_domain }}:19999",
enabled: yes,
authentik: no,
authentik_provider_type: proxy
}
```
18 changes: 17 additions & 1 deletion docs/Release Notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# Release Notes

Note that any update to a new version must be done manually using a `make update` since some variables may now be deprecated/renamed.
Note that any update to a new version might need to be done manually using a `make update` since some variables may now be deprecated/renamed.

## Version 1.4

New containers:

* Maintainerr
* Unpackerr
* Lidarr
* Autobrr
* Speedtest-Tracker
* Recyclarr
* tinyMediaManager
* PASTA
* Netdata

I now realize while writing these notes that version 0.2 was merged into 1.3 without a new Tag release, whoops...

## Version 1.3

Expand Down
88 changes: 1 addition & 87 deletions hms-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
become: yes
gather_facts: yes
vars:
hmsd_current_version: 1.3
hmsd_current_version: 1.4
hmsd_version_file: "{{ hms_docker_data_path }}/.hmsd-version"
regex: '[^A-Za-z0-9._-]'
replace: '_'
Expand All @@ -14,92 +14,6 @@
- galaxy-roles/geerlingguy.docker

tasks:
- name: Check if old variables dir exists
ansible.builtin.stat:
path: vars/custom
register: prev_var_dir

- name: Fail if previous var dir exists and is not symlink
ansible.builtin.fail:
msg: "You are using the old directory structure for variables. Please update your paths by running: 'make migrate-vars'. This will move the 'vars/custom' files to 'inventory/group_vars/all'"
when:
- prev_var_dir.stat.exists and not prev_var_dir.stat.islnk

- name: Ensure data path exists locally.
ansible.builtin.file:
path: "{{ hms_docker_data_path }}"
state: directory

- name: Check if version file exists
stat:
path: "{{ hmsd_version_file }}"
register: version_file_check

- name: Set last version if file doesn't exist
set_fact:
last_version: "0.0"
when: not version_file_check.stat.exists

- name: Read last version from file
slurp:
src: "{{ hmsd_version_file }}"
register: last_version_content
when: version_file_check.stat.exists

- name: Decode last version
set_fact:
last_version: "{{ last_version_content.content | b64decode | trim }}"
when: version_file_check.stat.exists

- name: Compare versions and prompt if newer
when: hmsd_current_version is version(last_version, '>') and not (is_github_runner | default(false))
block:
- name: Display current and last versions
debug:
msg: "New version: {{ hmsd_current_version }}, Your version: {{ last_version }}"

- name: Prompt user if they want to continue
pause:
prompt: |
A newer version of the playbook is about to be applied.
New version; {{ hmsd_current_version }}
Your version; {{ last_version }}
This may introduce breaking changes, please review all changes and understand them before applying.
Do you want to continue? (yes/no)
register: continue_playbook

- name: Hardlink path migration version prompt
when: last_version is version(0.2, '<')
block:
- name: Prompt user if they want to continue
pause:
prompt: |
Version 0.2 (you are on version {{ last_version }}) changed the paths that media and downloads are mounted to within containers.
You will need to update the apps config to point to the new location in the container.
Do you want to continue? (yes/no)"
register: continue_playbook_hardlink_update

- name: Fail if user does not want to continue
fail:
msg: "Playbook execution aborted."
when: continue_playbook_hardlink_update.user_input | lower != "yes"

- name: Fail if user does not want to continue
fail:
msg: "Playbook execution aborted."
when: continue_playbook.user_input | lower != "yes"

- name: Save current version to file
copy:
content: "{{ hmsd_current_version }}"
dest: "{{ hmsd_version_file }}"

- name: Ensure Nvidia GPU role if enabled
ansible.builtin.import_role:
name: gpu
Expand Down
75 changes: 75 additions & 0 deletions roles/hmsdocker/defaults/main/container_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,79 @@ hms_docker_container_map:
expose_to_public: no
homepage: yes
homepage_stats: yes
maintainerr:
enabled: no
proxy_host_rule: maintainerr
directory: yes
traefik: yes
authentik: no
authentik_provider_type: proxy
expose_to_public: no
unpackerr:
enabled: no
proxy_host_rule: unpackerr
directory: yes
traefik: yes
authentik: no
authentik_provider_type: proxy
expose_to_public: no
lidarr:
enabled: no
proxy_host_rule: lidarr
directory: yes
traefik: yes
authentik: no
authentik_provider_type: proxy
expose_to_public: no
homepage: yes
homepage_stats: yes
autobrr:
enabled: no
proxy_host_rule: autobrr
directory: yes
traefik: yes
authentik: no
authentik_provider_type: proxy
expose_to_public: no
homepage: yes
homepage_stats: yes
notifiarr:
enabled: no
proxy_host_rule: notifiarr
directory: yes
traefik: yes
authentik: no
authentik_provider_type: proxy
expose_to_public: no
speedtest-tracker:
enabled: no
proxy_host_rule: speedtest
directory: yes
traefik: yes
authentik: no
authentik_provider_type: proxy
expose_to_public: no
recyclarr:
enabled: no
directory: yes
tinymediamanager:
enabled: no
proxy_host_rule: tmm
directory: yes
traefik: yes
authentik: no
authentik_provider_type: proxy
expose_to_public: no
pasta:
enabled: no
proxy_host_rule: pasta
directory: yes
traefik: yes
authentik: no
authentik_provider_type: proxy
expose_to_public: no
netdata:
enabled: no



3 changes: 3 additions & 0 deletions roles/hmsdocker/defaults/main/homepage_api_keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ homepage_jellyfin_key:

# Emby
homepage_emby_key:

# Autobrr
homepage_autobrr_key:
Loading

0 comments on commit da304a0

Please sign in to comment.