Unpackerr / unpackerr

Extracts downloads for Radarr, Sonarr, Lidarr, Readarr, and/or a Watch folder - Deletes extracted files after import
https://unpackerr.zip
MIT License
1.02k stars 35 forks source link

Minor: README refers to unifi-poller #11

Closed arrrgi closed 5 years ago

arrrgi commented 5 years ago

Small one - the Docker section refers to unifi-poller, needs updating :)

davidnewhall commented 5 years ago

copy paste fail and I'm really tired. thanks for catching it.

Please let me know how the Docker image works for you! I'm done making changes and drafting releases for now. I finally got the homebrew formula building and uploading properly. Everything is working. 💯

arrrgi commented 5 years ago

I can see that from all those commits!

When you get an opportunity, have a look at https://gitlab.com/madcatsu/docker-deluge-unpacker-daemon/blob/master/Dockerfile

No need to copy verbatim as I do some things "my way" and no doubt there's probably a better way to do some of that. Something to note though is that I symlink the log file to capture the output in the container logs, otherwise, the log is contained in the overlay filesystem unless the log folder is also bind mounted.

Closing this one out

davidnewhall commented 5 years ago

That link is a 404. I tried to browse around the repo and can't seem to access any code there.

arrrgi commented 5 years ago

Sorry. Forgot I needed to change the project permissions, should be ok now.

davidnewhall commented 5 years ago

I'm a docker noob. Your profile says you're a 'spert, so please help me understand :D

The way I've configured the dockerfile is to invoke the application in the foreground. Which means no log files are written, it just writes to stdout and stderr if it has a problem.

That said, docker logs is the correct way to see the app output, correct? The code you've linked me to, which I really appreciate seeing, seems to be redirecting the app output into a file by linking a file descriptor. That feels pretty advanced/hardcore. Is that a normal Docker configuration?

I guess this is just saying that, I don't under what this statement means:

otherwise, the log is contained in the overlay filesystem unless the log folder is also bind mounted.

If it's not creating a log file by default, how does it wind up in any file system? Is this explaining that Docker saves the app's output into the overlay file system by default? I'm just not tracking the issue, sorry! I do want to understand though!

The README in your repo has also helped me understand how this can actually be used in Docker (by overlaying the downloads folder). Can you include your example configuration file too?

Thank you for this insight!

arrrgi commented 5 years ago

Ah, I totally missed that as you stated it was directing log output to syslog /messages and I'd inferred that wouldn't be captured by stdout or stderr. If that's the case, then I can probably just do away with symlinking the log file to a descriptor. So that's my mistake.

I've had to do the above in other places though where an app binary writes to somewhere like /var/log or a manually configured location. "eg --logfile /var/log/app.log". If the app doesn't create a log file and directs to std out/err, then no issue, if the output is to a log file only, then that location should be bind mounted to the host or another persistent file system.

So, to answer your question

Is this explaining that Docker saves the app's output into the overlay file system by default?

No, but it will get saved into the overlay filesystem if the app only outputs messages to a log file. As an example, the CouchPotato container from the Linuxserver team doesn't output much to stderr or stdout, most of that is still contained in the Couchpotato log files, so bind mounting the log folder is particularly useful

Also, for your ref, here's my redacted up.conf file from within my container. You'll note I'm referencing my Sonarr and Deluge containers by a short name as they are all containers within the same stack.

# Unpacker Poller Configuration File

# How often to poll deluge, sonarr and radarr.
# Recommend 2m-10m. Uses Go Duration.
interval = "5m"

# How long to wait for a reply from the backends: Deluge, Sonarr, Radarr.
# This can also be set per-app. Uses Go Duration.
timeout = "30s"

# How long must a file must have been extracted before deletion. The file must
# also not be part of an active queue item. Set this to "1m" to make sure files
# are deleted quickly after being imported. Recommend "10m". Uses Go Duration.
delete_delay="1m"

# How many files may be extracted in parallel. 1 works fine in most cases.
# Do not wrap the number in quotes.
concurrent_extracts=1

[deluge]
url="http://tor01c:8112"
password="REDACTED"
#timeout = "60s"

[sonarr]
url="http://snr01c:8989"
api_key="REDACTED"

#[radarr]
#url="http://127.0.0.1:7878"
#api_key=""
davidnewhall commented 5 years ago

This is great information thank you for sharing!