Gabisonfire / raincoat

Raincoat is a tool to search torrents using Jackett and send them to your client.
51 stars 15 forks source link

Docker Image Tips #19

Closed trip5 closed 3 years ago

trip5 commented 3 years ago

Hi All. I just wanted to share what is (mostly) a good way to make a Docker image for Raincoat. I use a Synology with an Intel CPU BTW.

It took me ages to get this right... and it's still just OK. It still doesn't sent torrents to Transmission or Deluge directly but some tinkering and I realized that Python needs libtorrent (lbry-libtorrent), not the Linux that this image is based off and now I can at least download .torrent files from magnet links (that was a heck of a puzzle for me).

dockerfile

FROM python:3.7.8-slim
ADD Raincoat.json /root/.config/Raincoat.json
RUN python -m pip install --upgrade pip setuptools wheel lbry-libtorrent raincoat-jackett
ENTRYPOINT ["/bin/bash", "/root/.config/Raincoat-search.sh"]

Alternative dockerfile for Github (but will make a much larger image)

FROM python:3.7.8-buster
ADD Raincoat.json /root/.config/Raincoat.json
RUN python -m pip install --upgrade pip
RUN pip install git+https://github.com/Gabisonfire/raincoat.git@develop
ENTRYPOINT ["/bin/bash", "/root/.config/Raincoat-search.sh"]

The initial Raincoat.json file can be totally blank, since later I mount /root/.config/ with a folder that contains my 2 main files anyway. The image won't build without at least a placeholder there...

Raincoat.json

{
    "jackett_apikey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "jackett_url": "http://127.0.0.1:9117",
    "jackett_indexer": "all",
    "description_length": 100,
    "exclude": "",
    "results_limit": 20,
    "client_url": "127.0.0.1:8111",
    "display": "grid",
    "torrent_client": "qbittorrent",
    "torrent_client_username": "admin",
    "torrent_client_password": "admin",
    "download_dir": "/watch"
 }

Raincoat-search.sh

raincoat -d --local artist_name_album_title_flac
sleep 5
raincoat -d --local artist_name_album_title_lossless
sleep 5
raincoat -d upcoming_movie_name_release_quality_1080p

Yes, repetition of albums seems very necessary... well, maybe. These need to be specific but not-too-specific searches.

In my Synology, this line is in the scheduler, set to run once a week: /usr/local/bin/docker container restart raincoat-jackett

I use this to regularly search for albums I'm missing good quality releases of and then it drops a .torrent file into a watch folder (which is monitored by Deluge which I use strictly for non-video downloads. In my example above, I also show how it can be pushed to Qbittorrent directly in the last line.

If I notice I'm missing an album or I grabbed a good one, I edit the search file accordingly. Yes, it's a bit clunky, but it certainly saves me some randomly-timed haphazard searching...

Thanks a lot Gabisonfire for making this. Sorry if this shows up in "issues" but I just wanted to share a bit of what I've learned and hope I can help someone else who might be having trouble.

Gabisonfire commented 3 years ago

Thank you very much @darkpoet78 . Moved to https://github.com/Gabisonfire/raincoat/wiki/Docker-Image-Tips