Schaka / janitorr

Cleans your Radarr, Sonarr, Jellyseerr and Jellyfin before you run out of space
GNU General Public License v3.0
326 stars 7 forks source link

Question about docker compose #68

Closed Mrs-Feathers closed 1 month ago

Mrs-Feathers commented 1 month ago

Hello! i have a question. i cant get the docker compose file working because i dont understand two variables

''' leaving-soon-dir: "/data/media/leaving-soon" # The directory that's known to Janitorr - this will contain new folders with symlinks to your media library for "Leaving Soon" media-server-leaving-soon-dir: "/data/media/leaving-soon" # This is the directory Jellyfin/Emby will be told it can find the "Leaving Soon" library, in case its mapped differently '''

i dont understand what it wants, maybe because english isnt my first language. can someone explain more simply or just different words?

thank you <3

Schaka commented 1 month ago

This is also explained in the readme.

image

You need to create a directory SOMEWHERE and you can choose to make this available to Janitorr as /data/media/leaving-soon by mapping it into the container (via docker-compose.yml) and then using the application.yml to tell Janitorr the path to find it at.

By default, you should keep both variables the same. If Janitorr looks like this: /share_media/media/leaving-soon:/data/media/leaving-soon And Jellyfin like this: /share_media/media/leaving-soon:/library/leaving-soon

Then your config should look like:

leaving-soon-dir: "/data/media/leaving-soon"
media-server-leaving-soon-dir: "/library/leaving-soon"
rickardfransson commented 1 month ago

For us that hardlink from torrents download dir. Do we map download dir or do we map radarrs import dir?.

Schaka commented 1 month ago

It needs access to the exact same path mapped exactly as radarr/sonarr. PLEASE read the readme.

If it cannot find the original files at the original location that it receives as information from the radarr, then it CANNOT create any symlinks. If it doesn't have access to the download directory, it cannot check if files are still located there (seeding check).

If you're struggling to set up file access, just leave it be and disable it. You'll only lose leaving-soon collections and seeding checks. The rest will work as expected.

rickardfransson commented 1 month ago

Reading the readme but it is really hard to understand.

So, i have mapped my download dir:

` volumes:

And then told in application: leaving-soon-dir: "/data/media/leaving-soon" # The directory that's known to Janitorr - this will contain new folders with symlinks to your media library for "Leaving Soon" media-server-leaving-soon-dir: "/home/rickardfransson/Media/" # This is the directory Jellyfin/Emby will be told it can find the "Leaving Soon" library, in case its mapped differently

I really dont see what have gone wrong. Still doesnt get symlinks and I get this fault in logs:

Fault:

2024-09-21T16:31:07.535Z TRACE 1 --- [ scheduling-1] c.g.s.j.m.AbstractMediaServerService : Movie folder - PathStructure(sourceFolder=/ home/rickardfransson/Media/Movies/Here After (2024), sourceFile=/home/rickardfransson/Media/Movies/Here After (2024)/Here After (2024) WEBDL- 1080p.mkv, targetFolder=/data/media/leaving-soon/movies/media/Here After (2024), targetFile=/data/media/leaving-soon/movies/media/Here After (2024)/Here After (2024) WEBDL-1080p.mkv) 2024-09-21T16:31:07.535Z INFO 1 --- [ scheduling-1] c.g.s.j.m.AbstractMediaServerService : Can't find original movie folder - no links to create /home/rickardfransson/Media/Movies/Here After (2024)/Here After (2024) WEBDL-1080p.mkv

I¨ve don my homework and read up in docker, but maybe im missing something?

Schaka commented 1 month ago

Janitorr can't find the original folder at the directory it tells you.

How can it? You never mapped that folder under that name into the container

Schaka commented 1 month ago

If Janitorr is your only containerized application and everything else is installed on your host, then you NEED to match your host in Janitorr.

services:
  janitorr:
    container_name: janitorr
    image: ghcr.io/schaka/janitorr:native-stable
    user: uid:gid
    volumes:
      - /home/rickardfransson/opt/janitorr/config/application.yml:/workspace/application.yml
      - /home/rickardfransson:/home/rickardfransson

application.yml

leaving-soon-dir: "/home/rickardfransson/Media/leaving-soon"
media-server-leaving-soon-dir: "/home/rickardfransson/Media/leaving-soon"

Of course, you need to create the leaving-soon dir and the user you start Janitorr as should match the user you're using. So on the terminal, type id.

The result will be

uid=1000(schaka) gid=1000(schaka) groups=1000(schaka)

So in the compose.yml, you replace uid and gid with the correct numbers, like so:

services:
  janitorr:
    container_name: janitorr
    image: ghcr.io/schaka/janitorr:native-stable
    user: 1000:1000
    volumes:
      - /home/rickardfransson/opt/janitorr/config/application.yml:/workspace/application.yml
      - /home/rickardfransson:/home/rickardfransson

This is the last time I'm answering a question not actually related to Janitorr from you.

Mrs-Feathers commented 1 month ago

thank you, schaka. your first message directly to me before the other user jumped in solved my problem. i did read the documentation, but my english skills sometimes arent good enough. seeing you explain it with different words made it make absolute sense! thank you.