What is the correct way for dockering?

How-to guides, frequently asked questions, not-so-obvious features, etc
Post Reply
BrandonSk
Posts: 2
Joined: 25 May 2017, 11:52

What is the correct way for dockering?

Post by BrandonSk » 25 May 2017, 12:00

Hello,

what is the correct way (or the most recommended way) to use dockers in cooperation with filebot.

Target:
Fully automated search, download, rename/move, and media center.

Now, if for each of the above I have a docker image (e.g. Sonarr, SABnzbd, Filebot, Plex), without the dockers I would use SABnzbd to call filebot amc script in the post-processing. I haven't found a way to call the filebot script, if each of the pieces (including filebot) run in their own container.

An obvious solution seems to be the use of filebot-watcher. But in several posts I have read that watching a directory for changes is not as preferred as calling the filebot script in post-download-processing.

Hence my question, is it in any and simple way possible or do I have to stick with watcher? (note: forking and modifying docker images is not a simple way for me)

Thank you very much for your ideas.
Brandon.

User avatar
rednoah
The Source
Posts: 13947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: What is the correct way for dockering?

Post by rednoah » 25 May 2017, 13:05

Well, the filebot command can easily be replaced with a docker container running said command.

e.g. call filebot directly:

Code: Select all

filebot -script fn:sysinfo
e.g. call filebot via docker:

Code: Select all

docker run -it -v $PWD:/volume1 -v data:/data rednoah/filebot -script fn:sysinfo
The main issue is probably how you can have your Sonarr/SABnzbd container call the filebot container because you'd have to make a call outside the container which probably isn't possible (by design).

Unfortunately, I don't have a solution for that. Your Sonarr/SABnzbd container would somehow have to be able to send a signal to the host, which in turn would run the filebot container.

The best solution is probably to have your host call filebot on a folder that only contains completed downloads on a schedule via cron (e.g. once or twice a day).

:idea: Having one container for Sonarr/SABnzbd/FileBot is probably the best solution, but you'd have to create your own docker container for that.
:idea: Please read the FAQ and How to Request Help.

SLiX
Posts: 8
Joined: 30 Mar 2014, 18:16

Re: What is the correct way for dockering?

Post by SLiX » 19 Jul 2017, 15:12

Hi, just an idea: what about a small REST API for docker-filebot? Do you have experience in that? I'm sure, this isn't done in a couple hours.
It would be nice to trigger filebot-watcher via HTTP. Or even better: POST Request to filebot-node (filebot config in Body of the request)

regards

User avatar
rednoah
The Source
Posts: 13947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: What is the correct way for dockering?

Post by rednoah » 19 Jul 2017, 15:20

Isn't that kinda what the FileBot Node Service is already doing for you? Though, I'd just run the docker and send commands via ssh, kinda like running commands on remote machines.
:idea: Please read the FAQ and How to Request Help.

SLiX
Posts: 8
Joined: 30 Mar 2014, 18:16

Re: What is the correct way for dockering?

Post by SLiX » 19 Jul 2017, 15:42

Sounds more like a 'dirty' solution, but I'll definetely look into this. Thanks for the hint!

I have a question regarding filebot-watcher and the config passing. Shall I open a new thread for that? Did not found a general docker thread

User avatar
rednoah
The Source
Posts: 13947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: What is the correct way for dockering?

Post by rednoah » 19 Jul 2017, 15:47

I'm not sure if a REST API would be any less dirty, certainly overkill. I'm no docker expert, but there should be some easy convenient way to call a command in a container and get back the console output.

You can make a docker thread. The watcher generally works exactly the same as the amc script, no more no less.
:idea: Please read the FAQ and How to Request Help.

BrandonSk
Posts: 2
Joined: 25 May 2017, 11:52

Re: What is the correct way for dockering?

Post by BrandonSk » 20 Jul 2017, 15:24

Hello both,

I admit I am not fully sure what you are talking about, but as long as it will work, then great.

In the meantime, the only solution, or rather a workaround I was able to do on Synology is this:
Sonarr, Radarr, SABnzbd is each running in its own container.
FileBot is installed directly on Synology as a package (could also be a container version, but for now I have the package).
I also installed WebStation package with PHP support.

Now, for each container I added a volume, which points to script folder. I have a separate shell script for movies, tvs, music and "auto" (or other). SABnzbd is configured to call corresponding script after download finishes.

The script is simple - it contains a curl command, calling a php page on the synology webstation. Each category has its own php page (although it could be just 1 page and pass a category parameter in the link, but I for testing I have separate pages).

The php page then executes another shell script which runs the appropriate filebot command.

I know there are security implications, especially as filebot has a sticky bit set and thus is always run as owner of filebot (not as http user). But since there is no outside access possible to my Syno, I am ok with that.

If anyone is interested, I can give some details.

Cheers,
B.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests