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 support for Flaresolverr and Jackett, fix UIDs, add some useful scripts, update README #49

Closed
wants to merge 10 commits into from
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,24 @@ crash*. It doesn't necessarily mean it will run well on your system ;) It featur
### Using the CLI
To make things easier, a CLI has been developed. First, clone the repository in a directory of your
choosing. You can run it by entering `python main.py` and the CLI will guide you through the
process. Please take a look at [important notes](#important-notes) before you continue.
process. Please take a look at [important notes](#important-notes) before you continue.
**This is the recommended method at the moment.**

### Manually
Manual installation currently isn't very sophisticated, but it can be done.
1. To get started, clone the repository in a directory of your choosing. **Note: this will be where
your installation and media will be as well, so think about this a bit.**
2. Copy `.env.sample` to a real `.env` by running `$ cp .env.sample .env`.
3. Set the environment variables to your liking. Note that `ROOT_DIR` should be the directory you
have cloned this in.
2. ~~Copy `.env.sample` to a real `.env` by running `$ cp .env.sample .env`.~~
3. ~~Set the environment variables to your liking. Note that `ROOT_DIR` should be the directory you
have cloned this in.~~
Comment on lines +53 to +55
Copy link
Owner

Choose a reason for hiding this comment

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

What is the reason for striking this through? Using a .env file seems like less work than finding and replacing all occurrences like you suggest in your addition to step 5 (where you also make no mention of the Plex claim token).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I figured that this was a remainder of a previous implementation because docker-compose didn't use those variables anywhere, I should've asked you about that first

4. Run `setup.sh` as superuser. This will set up your users, a system of directories, ensure
permissions are set correctly and sets some more environment variables for docker compose.
5. Take a look at the `docker-compose.yml` file. If there are services you would like to ignore
(for example, running PleX and Jellyfin at the same time is a bit unusual), you can comment them
out by placing `#` in front of the lines. This ensures they are ignored by Docker compose.
6. Run `docker compose up`.
You also need to replace the timezones and root folders. The default timezone is Europe/Amsterdam
Copy link

Choose a reason for hiding this comment

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

Didn't you change it to Sarajevo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did that on accident, good catch

and the default root folder is /ezarr. This is most easily done in a text editor with find and replace.
6. Run `docker compose up -d`.

That's it! Your containers are now up and you can continue to set up the settings in them. Please
take a look at [important notes](#important-notes) before you continue.
Expand All @@ -76,6 +80,13 @@ take a look at [important notes](#important-notes) before you continue.
field: `chmod -R 775 "%F/"`.
- You'll have to add indexers in Prowlarr by hand. Use Prowlarrs settings to connect it to the
other -arr apps.

### IMPORTANT IF USING NFS SHARES
- NFS shares' permissions are mapped by user IDs. If you want to access a file as a client, your user ID needs to match the user ID of the owner (or group) of that file on the NFS server.
Note that if you are a group member (and not the owner), having matching group IDs won't be enough, there also needs to be a corresponding user on the NFS server. The easiest way to make sure
the users and groups are set up on both sides correctly is to run setup.sh on both your NFS server and your client. Preferably run it on the server first.
If you are running this script on the client make sure that you temporarily enable -no-root-squash on your NFS server, as the script needs superuser privileges to run and by deafult on NFS the root
Copy link

Choose a reason for hiding this comment

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

Typo: default

user is mapped to nowhere to prevent abuse.

### SABnzbd External internet access denied message
When you're trying to access SABnzbd the first time you'll come across the message `External
Expand All @@ -92,7 +103,9 @@ official SABnzbd website.
## FAQ

### How to update containers
If you'd like to update containers, you can move to the directory of your `docker-compose.yml` file
There is a `update_containers.sh` script that takes care of this. Simply run it and it updates
Copy link
Owner

Choose a reason for hiding this comment

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

Nit: an update_containers.sh

all containers and removes old images. It's essentially the following steps but automated:
If you'd like to it manually, go to the directory of your `docker-compose.yml` file
and run `(sudo) docker compose pull`. This pulls the newest versions of all images (blueprints for
containers) listed in the `docker-compose.yml` file. Then, you can run `(sudo) docker compose up
-d`. This will deploy the new versions without losing uptime. Afterwards, you can run `(sudo)
Expand Down
214 changes: 125 additions & 89 deletions container_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,59 +16,6 @@ def __init__(self,
self.torrent_dir = root_dir + '/data/torrents'
self.usenet_dir = root_dir + '/data/usenet'

def plex(self):
return (
' plex:\n'
' image: lscr.io/linuxserver/plex:latest\n'
' container_name: plex\n'
' network_mode: host\n'
' environment:\n'
' - PUID=13010\n'
' - PGID=13000\n'
' - VERSION=docker\n'
' - PLEX_CLAIM=' + self.plex_claim + '\n'
' volumes:\n'
' - ' + self.config_dir + '/plex-config:/config\n'
' - ' + self.root_dir + '/data/media:/media\n'
' restart: unless-stopped\n\n'
)

def tautulli(self):
return (
' tautulli:\n'
' image: lscr.io/linuxserver/tautulli:latest\n'
' container_name: tautulli\n'
' depends_on:\n'
' - plex\n'
' environment:\n'
' - PUID=${UID}\n'
' - PGID=13000\n'
' - TZ=' + self.timezone + '\n'
' volumes:\n'
' - ' + self.config_dir + '/tautulli-config:/config\n'
' ports:\n'
' - "8181:8181"\n'
' restart: unless-stopped\n\n'
)

def jellyfin(self):
return (
' jellyfin:\n'
' image: lscr.io/linuxserver/jellyfin:latest\n'
' container_name: jellyfin\n'
' environment:\n'
' - PUID=${UID}\n'
' - PGID=13000\n'
' - UMASK=002\n'
' - TZ=' + self.timezone + '\n'
' volumes:\n'
' - ' + self.config_dir + '/jellyfin-config:/config\n'
' - ' + self.root_dir + '/data/media:/data\n'
' ports:\n'
' - "8096:8096"\n'
' restart: unless-stopped\n\n'
)

def sonarr(self):
return (
' sonarr:\n'
Expand Down Expand Up @@ -105,23 +52,6 @@ def radarr(self):
' restart: unless-stopped\n\n'
)

def bazarr(self):
return (
' bazarr:\n'
' image: lscr.io/linuxserver/bazarr:latest\n'
' container_name: bazarr\n'
' environment:\n'
' - PUID=13013\n'
' - PGID=13000\n'
' - TZ=' + self.timezone + '\n'
' volumes:\n'
' - ' + self.config_dir + '/bazarr-config:/config\n'
' - ' + self.root_dir + '/data/media:/media\n'
' ports:\n'
' - "6767:6767"\n'
' restart: unless-stopped\n\n'
)

def lidarr(self):
return (
' lidarr:\n'
Expand Down Expand Up @@ -167,6 +97,7 @@ def mylar3(self):
' - PUID=13005\n'
' - PGID=13000\n'
' - UMASK=002\n'
' - TZ=' + self.timezone + '\n'
' volumes:\n'
' - ' + self.config_dir + '/mylar-config:/config\n'
' - ' + self.root_dir + '/data:/data\n'
Expand All @@ -181,25 +112,42 @@ def audiobookshelf(self):
' image: ghcr.io/advplyr/audiobookshelf:latest\n'
' container_name: audiobookshelf\n'
' environment:\n'
' - AUDIOBOOKSHELF_UID=13009\n'
' - AUDIOBOOKSHELF_GID=13000\n'
' - user=13006:13000\n'
' - TZ=' + self.timezone + '\n'
' volumes:\n'
' - ' + self.config_dir + '/audiobookshelf:/config\n'
' - ' + self.root_dir + '/data/audiobooks:/audiobooks\n'
' - ' + self.root_dir + '/data/podcasts:/podcasts\n'
' - ' + self.root_dir + '/data/metadata:/metadata\n'
' - ' + self.root_dir + '/data/media/audiobooks:/audiobooks\n'
' - ' + self.root_dir + '/data/media/podcasts:/podcasts\n'
' - ' + self.root_dir + '/data/media/audiobookshelf-metadata:/metadata\n'
' ports:\n'
' - "13378:80"\n'
' restart: unless-stopped\n\n'
)

def bazarr(self):
return (
' bazarr:\n'
' image: lscr.io/linuxserver/bazarr:latest\n'
' container_name: bazarr\n'
' environment:\n'
' - PUID=13007\n'
' - PGID=13000\n'
' - TZ=' + self.timezone + '\n'
' volumes:\n'
' - ' + self.config_dir + '/bazarr-config:/config\n'
' - ' + self.root_dir + '/data/media:/media\n'
' ports:\n'
' - "6767:6767"\n'
' restart: unless-stopped\n\n'
)

def prowlarr(self):
return (
' prowlarr:\n'
' image: lscr.io/linuxserver/prowlarr:develop\n'
' container_name: prowlarr\n'
' environment:\n'
' - PUID=13006\n'
' - PUID=13008\n'
' - PGID=13000\n'
' - UMASK=002\n'
' - TZ=' + self.timezone + '\n'
Expand All @@ -210,24 +158,89 @@ def prowlarr(self):
' restart: unless-stopped\n\n'
)

def qbittorrent(self):
def jackett(self):
return (
' qbittorrent:\n'
' image: lscr.io/linuxserver/qbittorrent:latest\n'
' container_name: qbittorrent\n'
' jackett:\n'
' image: lscr.io/linuxserver/jackett:latest\n'
' container_name: jackett\n'
' environment:\n'
' - PUID=13007\n'
' - PUID=13009\n'
' - PGID=13000\n'
' - UMASK=002\n'
' - TZ=' + self.timezone + '\n'
' - WEBUI_PORT=8080\n'
' volumes:\n'
' - ' + self.config_dir + '/qbittorrent-config:/config\n'
' - ' + self.torrent_dir + ':/data/torrents\n'
' - ' + self.config_dir + '/jackett-config:/config\n'
' ports:\n'
' - "8080:8080"\n'
' - "6881:6881"\n'
' - "6881:6881/udp"\n'
' - 9117:9117\n'
' restart: unless-stopped\n\n'
)

def flaresolverr(self):
return (
' flaresolverr:\n'
' image: ghcr.io/flaresolverr/flaresolverr:latest\n'
' container_name: flaresolverr\n'
' environment:\n'
' - LOG_LEVEL=${LOG_LEVEL:-info}\n'
' - LOG_HTML=${LOG_HTML:-false}\n'
' - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}\n'
' - TZ=' + self.timezone + '\n'
' ports:\n'
' - "8191:8191"\n'
' restart: unless-stopped\n\n'
)

def plex(self):
return (
' plex:\n'
' image: lscr.io/linuxserver/plex:latest\n'
' container_name: plex\n'
' network_mode: host\n'
' environment:\n'
' - PUID=13010\n'
' - PGID=13000\n'
' - TZ=' + self.timezone + '\n'
' - VERSION=docker\n'
' - PLEX_CLAIM=' + self.plex_claim + '\n'
' volumes:\n'
' - ' + self.config_dir + '/plex-config:/config\n'
' - ' + self.root_dir + '/data/media:/media\n'
' restart: unless-stopped\n\n'
)

def tautulli(self):
return (
' tautulli:\n'
' image: lscr.io/linuxserver/tautulli:latest\n'
' container_name: tautulli\n'
' depends_on:\n'
' - plex\n'
' environment:\n'
' - PUID=${UID}\n'
' - PGID=13000\n'
' - TZ=' + self.timezone + '\n'
' volumes:\n'
' - ' + self.config_dir + '/tautulli-config:/config\n'
' ports:\n'
' - "8181:8181"\n'
' restart: unless-stopped\n\n'
)

def jellyfin(self):
return (
' jellyfin:\n'
' image: lscr.io/linuxserver/jellyfin:latest\n'
' container_name: jellyfin\n'
' environment:\n'
' - PUID=${UID}\n'
' - PGID=13000\n'
' - UMASK=002\n'
' - TZ=' + self.timezone + '\n'
' volumes:\n'
' - ' + self.config_dir + '/jellyfin-config:/config\n'
' - ' + self.root_dir + '/data/media:/data\n'
' ports:\n'
' - "8096:8096"\n'
' restart: unless-stopped\n\n'
)

Expand All @@ -237,7 +250,7 @@ def overseerr(self):
' image: sctx/overseerr:latest\n'
' container_name: overseerr\n'
' environment:\n'
' - PUID=13009\n'
' - PUID=13011\n'
' - PGID=13000\n'
' - UMASK=002\n'
' - TZ=' + self.timezone + '\n'
Expand Down Expand Up @@ -265,13 +278,34 @@ def jellyseerr(self):
' restart: unless-stopped\n\n'
)

def qbittorrent(self):
return (
' qbittorrent:\n'
' image: lscr.io/linuxserver/qbittorrent:latest\n'
' container_name: qbittorrent\n'
' environment:\n'
' - PUID=13013\n'
' - PGID=13000\n'
' - UMASK=002\n'
' - TZ=' + self.timezone + '\n'
' - WEBUI_PORT=8080\n'
' volumes:\n'
' - ' + self.config_dir + '/qbittorrent-config:/config\n'
' - ' + self.torrent_dir + ':/data/torrents\n'
' ports:\n'
' - "8080:8080"\n'
' - "6881:6881"\n'
' - "6881:6881/udp"\n'
' restart: unless-stopped\n\n'
)

def sabnzbd(self):
return (
' sabnzbd:\n'
' image: lscr.io/linuxserver/sabnzbd:latest\n'
' container_name: sabnzbd\n'
' environment:\n'
' - PUID=13011\n'
' - PUID=13014\n'
' - PGID=13000\n'
' - UMASK=002\n'
' - TZ=' + self.timezone + '\n'
Expand All @@ -282,3 +316,5 @@ def sabnzbd(self):
' - "8081:8080"\n'
' restart: unless-stopped\n\n'
)


Loading
Loading