Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions container_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
15 changes: 15 additions & 0 deletions docker-compose.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ services:
- "8989:8989"
restart: unless-stopped

sportarr:
image: sportarr/sportarr:latest
container_name: sportarr
environment:
- PUID=${SPORTARR_UID}
- PGID=${MEDIACENTER_GID}
- UMASK=002
- TZ=${TIMEZONE}
volumes:
- ${ROOT_DIR}/config/sportarr-config:/config
- ${ROOT_DIR}/data:/data
ports:
- "1867:1867"
restart: unless-stopped
Comment thread
Luctia marked this conversation as resolved.

radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
Expand Down
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions remove_old_users.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -41,11 +42,12 @@ 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
Comment thread
Luctia marked this conversation as resolved.

# 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/
Expand All @@ -69,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."
9 changes: 9 additions & 0 deletions users_groups_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Loading