From 6fae42aa42b281e5feb97753eb2afe7df60710c8 Mon Sep 17 00:00:00 2001 From: Sportarr Date: Tue, 4 Aug 2026 18:49:34 -0400 Subject: [PATCH 1/2] Add Sportarr support Sportarr (https://github.com/Sportarr/Sportarr) is a sports event manager in the Starr family. Follows the existing per-service pattern: compose entry (sportarr/sportarr image, port 1867), dedicated service user with UID 13015 in the mediacenter group, a sports media folder, CLI prompt, env sample, setup/removal scripts and README mention. --- .env.sample | 1 + README.md | 4 +++- container_configs.py | 18 ++++++++++++++++++ docker-compose.yml.sample | 15 +++++++++++++++ main.py | 1 + remove_old_users.sh | 1 + setup.sh | 2 ++ users_groups_setup.py | 9 +++++++++ 8 files changed, 50 insertions(+), 1 deletion(-) diff --git a/.env.sample b/.env.sample index 05ddae8..dc21c97 100644 --- a/.env.sample +++ b/.env.sample @@ -22,6 +22,7 @@ LIDARR_UID=13003 READARR_UID=13004 MYLAR_UID=13005 AUDIOBOOKSHELF_UID=13014 +SPORTARR_UID=13015 BAZARR_UID=13013 PROWLARR_UID=13006 QBITTORRENT_UID=13007 diff --git a/README.md b/README.md index 21a498a..e3be596 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Ezarr is a project built to make it EZ to deploy a Servarr mediacenter on an Ubu badge above means that the shell script and docker-compose file in this repository at least *don't crash*. It doesn't necessarily mean it will run well on your system ;) It's set up to follow the [TRaSH guidelines](https://trash-guides.info/Hardlinks/How-to-setup-for/Docker/) so it should at least perform optimally. It features: +- [Sportarr](https://github.com/Sportarr/Sportarr) is an application to manage sports events, in the + style of the Starr family. It monitors leagues and grabs, sorts, and renames broadcasts. - [Sonarr](https://sonarr.tv/) is an application to manage TV shows. It is capable of keeping track of what you'd like to watch, at what quality, in which language and more, and can find a place to download this if connected to Prowlarr and qBittorrent. It can also reorganize the media you @@ -57,7 +59,7 @@ To make things easier, a CLI has been developed. First, clone the repository in choosing. You can run it by entering `python3 main.py` and the CLI will guide you through the process. This is the recommended method if you're setting this up for the first time on a new system. Please take a look at [important notes](#important-notes) before you continue. -**NOTE: This script will create users for each container with IDs ranging from 13001 to 13014. +**NOTE: This script will create users for each container with IDs ranging from 13001 to 13015. If you want to choose your own IDs (or some of them are occupied) you have to go through the manual install.** ### Manually diff --git a/container_configs.py b/container_configs.py index 7a02dc5..3a9b181 100644 --- a/container_configs.py +++ b/container_configs.py @@ -93,6 +93,24 @@ def sonarr(self): ' restart: unless-stopped\n\n' ) + def sportarr(self): + return ( + ' sportarr:\n' + ' image: sportarr/sportarr:latest\n' + ' container_name: sportarr\n' + ' environment:\n' + ' - PUID=13015\n' + ' - PGID=13000\n' + ' - UMASK=002\n' + f' - TZ={self.timezone}\n' + ' volumes:\n' + f' - {self.config_dir}/sportarr-config:/config\n' + f' - {self.root_dir}/data:/data\n' + ' ports:\n' + ' - "1867:1867"\n' + ' restart: unless-stopped\n\n' + ) + def radarr(self): return ( ' radarr:\n' diff --git a/docker-compose.yml.sample b/docker-compose.yml.sample index 2b9496e..d8e13c6 100644 --- a/docker-compose.yml.sample +++ b/docker-compose.yml.sample @@ -16,6 +16,21 @@ services: - "8989:8989" restart: unless-stopped + sportarr: + image: sportarr/sportarr:latest + container_name: sportarr + environment: + - PUID=13015 + - PGID=13000 + - UMASK=002 + - TZ=Etc/UTC + volumes: + - /opt/ezarr/config/sportarr-config:/config + - /opt/ezarr/data:/data + ports: + - "1867:1867" + restart: unless-stopped + radarr: image: lscr.io/linuxserver/radarr:latest container_name: radarr diff --git a/main.py b/main.py index 6c9c7ae..3ef668d 100644 --- a/main.py +++ b/main.py @@ -50,6 +50,7 @@ def main(): print('\n===SERVARR===') services_classed['servarr'] = [] take_input('sonarr', 'servarr') + take_input('sportarr', 'servarr') take_input('radarr', 'servarr') take_input('lidarr', 'servarr') take_input('mylar3', 'servarr') diff --git a/remove_old_users.sh b/remove_old_users.sh index e48436c..7bf98d5 100755 --- a/remove_old_users.sh +++ b/remove_old_users.sh @@ -6,6 +6,7 @@ sudo docker compose down # Remove old users and group sudo userdel sonarr +sudo userdel sportarr sudo userdel radarr sudo userdel lidarr sudo userdel readarr diff --git a/setup.sh b/setup.sh index ee5e15e..4c667d3 100755 --- a/setup.sh +++ b/setup.sh @@ -21,6 +21,7 @@ sudo useradd plex -u $PLEX_UID sudo useradd sabnzbd -u $SABNZBD_UID sudo useradd bazarr -u $BAZARR_UID sudo useradd audiobookshelf -u $AUDIOBOOKSHELF_UID +sudo useradd sportarr -u $SPORTARR_UID sudo groupadd mediacenter -g $MEDIACENTER_GID # Adds current user to the mediacenter group. This is recommended so that you can still have access to files inside the ezarr folder structure for manual control. @@ -41,6 +42,7 @@ sudo usermod -a -G mediacenter plex sudo usermod -a -G mediacenter sabnzbd sudo usermod -a -G mediacenter bazarr sudo usermod -a -G mediacenter audiobookshelf +sudo usermod -a -G mediacenter sportarr # Make directories # ${ROOT_DIR:-.}/ means take the value from ROOT_DIR value, if failed or empty place it in the current folder diff --git a/users_groups_setup.py b/users_groups_setup.py index 88545f6..211e2c7 100644 --- a/users_groups_setup.py +++ b/users_groups_setup.py @@ -28,6 +28,15 @@ def sonarr(self): self.create_config_dir('sonarr') os.system('sudo usermod -a -G mediacenter sonarr') + def sportarr(self): + os.system( + '/bin/bash -c "sudo useradd sportarr -u 13015' + ' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,usenet,torrents}/sports -m 775' + ' ; sudo chown -R sportarr:mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}/sports"' + ) + self.create_config_dir('sportarr') + os.system('sudo usermod -a -G mediacenter sportarr') + def radarr(self): os.system( '/bin/bash -c "sudo useradd radarr -u 13002' From 70f0cf8de5c68d702c5d32428bc5290d1d4cb518 Mon Sep 17 00:00:00 2001 From: Sportarr Date: Wed, 5 Aug 2026 11:41:23 -0400 Subject: [PATCH 2/2] fix: use env vars for sportarr in compose sample, create its config/data dirs Addresses review feedback from Copilot and Luctia on PR #84. The sample docker-compose sportarr service hardcoded PUID/PGID/TZ and absolute /opt/ezarr paths instead of using the same ${SPORTARR_UID}/ ${MEDIACENTER_GID}/${TIMEZONE}/${ROOT_DIR} variables every other service in the file uses, breaking custom ROOT_DIR/timezone/UID setups. setup.sh created the sportarr user but never created its config or sports data directories, even though the PR description said it did. Changes: - docker-compose.yml.sample: sportarr block now matches the exact variable pattern radarr/sonarr/etc. use - setup.sh: added sportarr to the config-dir mkdir list, sports to the data-dir mkdir list (matching the CLI-generated path's existing behavior), and a chown line for sportarr-config --- docker-compose.yml.sample | 10 +++++----- setup.sh | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml.sample b/docker-compose.yml.sample index d8e13c6..7d9af52 100644 --- a/docker-compose.yml.sample +++ b/docker-compose.yml.sample @@ -20,13 +20,13 @@ services: image: sportarr/sportarr:latest container_name: sportarr environment: - - PUID=13015 - - PGID=13000 + - PUID=${SPORTARR_UID} + - PGID=${MEDIACENTER_GID} - UMASK=002 - - TZ=Etc/UTC + - TZ=${TIMEZONE} volumes: - - /opt/ezarr/config/sportarr-config:/config - - /opt/ezarr/data:/data + - ${ROOT_DIR}/config/sportarr-config:/config + - ${ROOT_DIR}/data:/data ports: - "1867:1867" restart: unless-stopped diff --git a/setup.sh b/setup.sh index 4c667d3..0c6093e 100755 --- a/setup.sh +++ b/setup.sh @@ -46,8 +46,8 @@ sudo usermod -a -G mediacenter sportarr # Make directories # ${ROOT_DIR:-.}/ means take the value from ROOT_DIR value, if failed or empty place it in the current folder -sudo mkdir -pv ${ROOT_DIR:-.}/config/{sonarr,radarr,lidarr,mylar,prowlarr,qbittorrent,jackett,audiobookshelf,seerr,plex,jellyfin,tautulli,sabnzbd,bazarr}-config -sudo mkdir -pv ${ROOT_DIR:-.}/data/{torrents,usenet,media}/{tv,movies,music,books,comics,audiobooks,podcasts,audiobookshelf-metadata} +sudo mkdir -pv ${ROOT_DIR:-.}/config/{sonarr,radarr,lidarr,mylar,prowlarr,qbittorrent,jackett,audiobookshelf,seerr,plex,jellyfin,tautulli,sabnzbd,bazarr,sportarr}-config +sudo mkdir -pv ${ROOT_DIR:-.}/data/{torrents,usenet,media}/{tv,movies,music,books,comics,audiobooks,podcasts,audiobookshelf-metadata,sports} # Set permissions sudo chmod -R 775 ${ROOT_DIR:-.}/data/ @@ -71,5 +71,6 @@ sudo chown -R $UID:mediacenter ${ROOT_DIR:-.}/config/tautulli-config sudo chown -R sabnzbd:mediacenter ${ROOT_DIR:-.}/config/sabnzbd-config sudo chown -R bazarr:mediacenter ${ROOT_DIR:-.}/config/bazarr-config sudo chown -R audiobookshelf:mediacenter ${ROOT_DIR:-.}/config/audiobookshelf-config +sudo chown -R sportarr:mediacenter ${ROOT_DIR:-.}/config/sportarr-config echo "Done! It is recommended to reboot now."