kelinger / OmniStream

Deployment and management tools for an entire streaming platform that can reside on a server (local, remote, hosted, VPS) with media files stored on cloud services like Google Drive or Dropbox.
MIT License
33 stars 10 forks source link

Custom docker containers radarr4k/sonarr4k #19

Closed mahogl closed 2 years ago

mahogl commented 2 years ago

Hi again,

I have some problems getting my own custom radarr4k/sonarr4k containers so if someone could i share and updated radarr4k/sonarr4k.yaml. The example omnistream.cloud - custom docker containers, looks like it uses the same ports as Radarr itself. I know this is not supported, but i had to ask instead of banging my head into the wall.

I have tried different configurations without success the application just keeps on restarting.

radarr4k logs:

radarr4k | s6-rc: info: service s6rc-oneshot-runner: starting radarr4k | s6-rc: info: service s6rc-oneshot-runner successfully started radarr4k | s6-rc: info: service fix-attrs: starting radarr4k | s6-rc: info: service 00-legacy: starting radarr4k | s6-rc: info: service fix-attrs successfully started radarr4k | s6-rc: info: service legacy-cont-init: starting radarr4k | s6-rc: info: service 00-legacy successfully started radarr4k | cont-init: info: running /etc/cont-init.d/01-envfile radarr4k | cont-init: info: /etc/cont-init.d/01-envfile exited 0 radarr4k | cont-init: info: running /etc/cont-init.d/01-migrations radarr4k | [migrations] started radarr4k | [migrations] no migrations found radarr4k | cont-init: info: /etc/cont-init.d/01-migrations exited 0 radarr4k | cont-init: info: running /etc/cont-init.d/02-tamper-check radarr4k | cont-init: info: /etc/cont-init.d/02-tamper-check exited 0 radarr4k | cont-init: info: running /etc/cont-init.d/10-adduser radarr4k | usermod: no changes radarr4k | radarr4k | ------------------------------------- radarr4k | _ () radarr4k | | | radarr4k | | | / | | | / \ radarr4k | | | _ \ | | | () | radarr4k | || |__/ || \/ radarr4k | radarr4k | radarr4k | Brought to you by linuxserver.io radarr4k | ------------------------------------- radarr4k | radarr4k | To support the app dev(s) visit: radarr4k | Radarr: https://opencollective.com/radarr radarr4k | radarr4k | To support LSIO projects visit: radarr4k | https://www.linuxserver.io/donate/ radarr4k | ------------------------------------- radarr4k | GID/UID radarr4k | ------------------------------------- radarr4k | radarr4k | User uid: 1001 radarr4k | User gid: 1001 radarr4k | ------------------------------------- radarr4k | radarr4k | cont-init: info: /etc/cont-init.d/10-adduser exited 0 radarr4k | cont-init: info: running /etc/cont-init.d/30-config radarr4k | cont-init: info: /etc/cont-init.d/30-config exited 0 radarr4k | cont-init: info: running /etc/cont-init.d/90-custom-folders radarr4k | cont-init: info: /etc/cont-init.d/90-custom-folders exited 0 radarr4k | cont-init: info: running /etc/cont-init.d/99-custom-files radarr4k | [custom-init] no custom services found, skipping... radarr4k | [custom-init] no custom files found, skipping... radarr4k | cont-init: info: /etc/cont-init.d/99-custom-files exited 0 radarr4k | s6-rc: info: service legacy-cont-init successfully started radarr4k | s6-rc: info: service init-mods: starting radarr4k | s6-rc: info: service init-mods successfully started radarr4k | s6-rc: info: service init-mods-package-install: starting radarr4k | s6-rc: info: service init-mods-package-install successfully started radarr4k | s6-rc: info: service init-mods-end: starting radarr4k | s6-rc: info: service init-mods-end successfully started radarr4k | s6-rc: info: service init-services: starting radarr4k | s6-rc: info: service init-services successfully started radarr4k | s6-rc: info: service legacy-services: starting radarr4k | services-up: info: copying legacy longrun radarr (no readiness notification) radarr4k | s6-rc: info: service legacy-services successfully started radarr4k | s6-rc: info: service 99-ci-service-check: starting radarr4k | [ls.io-init] done. radarr4k | s6-rc: info: service 99-ci-service-check successfully started radarr4k | [Info] Bootstrap: Starting Radarr - /app/radarr/bin/Radarr - Version 4.1.0.6175 radarr4k | [Debug] Bootstrap: Console selected radarr4k | [Info] AppFolderInfo: Data directory is being overridden to [/config] radarr4k | [Debug] Microsoft.Extensions.Hosting.Internal.Host: Hosting starting radarr4k | [Info] AppFolderInfo: Data directory is being overridden to [/config] radarr4k | [Info] MigrationController: Migrating data source=/config/radarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 radarr4k | [Info] MigrationController: Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 radarr4k | [Info] Microsoft.Hosting.Lifetime: Now listening on: http://[::]:7879 radarr4k | [Info] CommandExecutor: Starting 2 threads for tasks. radarr4k | [Info] Microsoft.Hosting.Lifetime: Application started. Press Ctrl+C to shut down. radarr4k | [Info] Microsoft.Hosting.Lifetime: Hosting environment: Production radarr4k | [Info] Microsoft.Hosting.Lifetime: Content root path: /app/radarr/bin radarr4k | s6-rc: info: service 99-ci-service-check: stopping radarr4k | s6-rc: info: service 99-ci-service-check successfully stopped radarr4k | s6-rc: info: service legacy-services: stopping radarr4k | [Info] Microsoft.Hosting.Lifetime: Application is shutting down... radarr4k | [Info] ConsoleApp: Exiting main. radarr4k | s6-rc: info: service legacy-services successfully stopped radarr4k | s6-rc: info: service init-services: stopping radarr4k | s6-rc: info: service 00-legacy: stopping radarr4k | s6-rc: info: service init-services successfully stopped radarr4k | s6-rc: info: service init-mods-end: stopping radarr4k | s6-rc: info: service 00-legacy successfully stopped radarr4k | s6-rc: info: service init-mods-end successfully stopped radarr4k | s6-rc: info: service init-mods-package-install: stopping radarr4k | s6-rc: info: service init-mods-package-install successfully stopped radarr4k | s6-rc: info: service init-mods: stopping radarr4k | s6-rc: info: service init-mods successfully stopped radarr4k | s6-rc: info: service legacy-cont-init: stopping radarr4k | s6-rc: info: service legacy-cont-init successfully stopped radarr4k | s6-rc: info: service fix-attrs: stopping radarr4k | s6-rc: info: service fix-attrs successfully stopped radarr4k | s6-rc: info: service s6rc-oneshot-runner: stopping radarr4k | s6-rc: info: service s6rc-oneshot-runner successfully stopped radarr4k exited with code 0 radarr4k exited with code 0``

radarr4k.yaml (i changed the radarr config.xml to run on port 7879) `#

Radarr4k - Movie catalog and management

# radarr4k: image: lscr.io/linuxserver/radarr:latest container_name: radarr4k hostname: radarr4k domainname: ${MYDOMAIN} restart: unless-stopped depends_on: traefik: condition: service_healthy omnimount: condition: service_healthy environment:

TechPerplexed commented 2 years ago

Check this page for a complete tutorial on how to set that up: https://www.omnistream.cloud/tips-tricks/custom-containers

mahogl commented 2 years ago

I have used that guide for setting up other custom containers, and the concept i good. My problem is with radarr4k/sonarr4k/ if i look at the example on https://www.omnistream.cloud/tips-tricks/custom-containers for radarr4k it uses the same port as the "ordinary" radarr docker instance so dont think that would work right?

radarr4k: image: lscr.io/linuxserver/radarr container_name: radarr4k hostname: radarr4k domainname: ${MYDOMAIN} restart: unless-stopped depends_on: traefik: condition: service_healthy omnimount: condition: service_healthy environment:

So if someone have a working radarr4k.yaml i could use as an base, i know this is not supported, but i would appreciate the help.

mahogl commented 2 years ago

Think i might have figure it out, will test som more and report back

mahogl commented 2 years ago

I got one step closer, but for som reason i get "bad gatway 502" error from cloudflare when it tries to redirect me to sonarr4k.mydomain.com. I get the authentication step from Traefik, but after that i get the 502 error.

sonarr4k.yaml: #

Sonarr - TV Show catalog and management

# sonarr4k: image: lscr.io/linuxserver/sonarr container_name: sonarr4k hostname: sonarr4k domainname: ${MYDOMAIN} restart: unless-stopped depends_on: traefik: condition: service_healthy omnimount: condition: service_healthy environment:

TechPerplexed commented 2 years ago

You shouldn't add or change any of the ports... that's the thing about Traefik: it routes things internally and only talks to the outside world using one single port (443).

So you can add as many *arr containers manually as you like and they can all use the same port. Same goes for all other containers, for example I have 3 Apache websites running all using port 80.

kelinger commented 2 years ago

As @TechPerplexed said, the issue is:

You're bypassing Traefik by opening a port to the main system. Don't do that. Elminate the Ports section entirely.

Additionally, the port INSIDE the containers is wrong unless you've actually reconfigured the app to run on a different port (if so, this wasn't done on through the above configurations). Again, this is not necessary and where your trouble is. You can have 10 web servers running in Docker with each container using ports 80 and 443 (as an example) and each serving up different URLs which Traefik would then route accordingly. This is essentially the same thing except with Radarr/Sonarr using their assigned web ports.

As such the Traefik loadbalancer ports will remain at 8989 (Sonarr) and 7878 (Radarr).

mahogl commented 2 years ago

You are correct, I was thinking wrongly about this. My thought was that it would be an port conflict if both instances was running on the same port on the backend. But its not since each docker instance has its own IP. Why make it complicated when it is easy, sorry to bother you with this mistake.

Leaving the sonarr4k/radarr4k.yamel below, if someone is doing my mistake or wonder how the config should look like.

sonarr4k.yaml #

Sonarr - TV Show catalog and management

# sonarr4k: image: lscr.io/linuxserver/sonarr container_name: sonarr4k hostname: sonarr4k domainname: ${MYDOMAIN} restart: unless-stopped depends_on: traefik: condition: service_healthy omnimount: condition: service_healthy environment:

radarr4k.yaml #

Radarr4k - Movie catalog and management

# radarr4k: image: lscr.io/linuxserver/radarr:latest container_name: radarr4k hostname: radarr4k domainname: ${MYDOMAIN} restart: unless-stopped depends_on: traefik: condition: service_healthy omnimount: condition: service_healthy environment:

TechPerplexed commented 2 years ago

It'll probably be good information for new users, so thanks for posting this issue 😊