fix(media): load chaptarr scripts from /config, not a ./ mount

A relative bind resolves to Portainer's internal /data/compose/<id>/ path
and would bind an empty dir, so chaptarr couldn't find start.sh. Load the
scripts from /config/chaptarr/scripts (already mounted at /config) instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ginnoir (outpost agent)andClaude Opus 5.5 committed 2026-12-03 03:58:09 -06:00
1 parent 5d70a4e825
commit 73d7d674fc
2 files changed
+8 -6

No files matched your search

+2 -2
View File
@@ -64,9 +64,9 @@ sudo chown -R 1000:1000 /config/chaptarr /config/calibre-web-automated /config/a
## Hardlinks + chaptarr's ebook copy (2026-12-03) ## Hardlinks + chaptarr's ebook copy (2026-12-03)
- Chaptarr mounts `/storage1` **once**. `chaptarr/start.sh` (the entrypoint wrapper) symlinks `/downloads`, `/audiobooks` and `/ebooks` into it. With separate bind mounts, `link()` fails with EXDEV and chaptarr silently copied every import instead, so seeding audiobooks existed twice. The container paths didn't change, so chaptarr's DB needed no migration. - Chaptarr mounts `/storage1` **once**. `/config/scripts/start.sh` (the entrypoint wrapper; host `/config/chaptarr/scripts/`, canonical copy `stacks/media/chaptarr/`, scp it on change) symlinks `/downloads`, `/audiobooks` and `/ebooks` into it. With separate bind mounts, `link()` fails with EXDEV and chaptarr silently copied every import instead, so seeding audiobooks existed twice. The container paths didn't change, so chaptarr's DB needed no migration.
- `/ebooks` → `/storage1/Media/Ebooks` is chaptarr's own ebook folder (it used to be the CWA ingest folder, which CWA empties, so chaptarr thought every ebook was missing). - `/ebooks` → `/storage1/Media/Ebooks` is chaptarr's own ebook folder (it used to be the CWA ingest folder, which CWA empties, so chaptarr thought every ebook was missing).
- Connect → Custom Script **"CWA ingest"** (`/scripts/cwa-ingest.sh`, On Import + On Upgrade) hardlinks each newly imported ebook into `/storage1/complete/books-ingest/<Author>/`. CWA deletes its link after ingest, and chaptarr's file remains. - Connect → Custom Script **"CWA ingest"** (`/config/scripts/cwa-ingest.sh`, On Import + On Upgrade) hardlinks each newly imported ebook into `/storage1/complete/books-ingest/<Author>/`. CWA deletes its link after ingest, and chaptarr's file remains.
- Existing Calibre books were backfilled by hardlinking them from `/storage1/Media/Books` into `/storage1/Media/Ebooks/<Author>/` and rescanning. - Existing Calibre books were backfilled by hardlinking them from `/storage1/Media/Books` into `/storage1/Media/Ebooks/<Author>/` and rescanning.
- Hardlinks share content, so never edit files in `/storage1/Media/Ebooks` in place (e.g. chaptarr metadata writing). That would also change Calibre's copy of a backfilled book. - Hardlinks share content, so never edit files in `/storage1/Media/Ebooks` in place (e.g. chaptarr metadata writing). That would also change Calibre's copy of a backfilled book.
+6 -4
View File
@@ -252,10 +252,10 @@ services:
# ============================================================ BOOKS # ============================================================ BOOKS
# Prowlarr -> chaptarr -> qbittorrent/nzbget (/storage1/complete). Chaptarr # Prowlarr -> chaptarr -> qbittorrent/nzbget (/storage1/complete). Chaptarr
# keeps its own ebook copy in /storage1/Media/Ebooks (so it knows what it has) # keeps its own ebook copy in /storage1/Media/Ebooks (so it knows what it has)
# and its Custom Script hook (chaptarr/cwa-ingest.sh) hardlinks each new ebook # and its Custom Script hook (/config/scripts/cwa-ingest.sh) hardlinks each new ebook
# into the CWA ingest folder (CWA owns the Calibre library and deletes ingested # into the CWA ingest folder (CWA owns the Calibre library and deletes ingested
# files). Audiobooks go straight into the ABS library. # files). Audiobooks go straight into the ABS library.
# /storage1 is mounted once and chaptarr/start.sh symlinks /downloads, # /storage1 is mounted once and /config/scripts/start.sh symlinks /downloads,
# /audiobooks, /ebooks into it — separate bind mounts break hardlinks (EXDEV). # /audiobooks, /ebooks into it — separate bind mounts break hardlinks (EXDEV).
# Storyteller reads both libraries read-only and writes aligned EPUBs to its # Storyteller reads both libraries read-only and writes aligned EPUBs to its
# own /data. Readarr is retired upstream — do not add it. # own /data. Readarr is retired upstream — do not add it.
@@ -270,12 +270,14 @@ services:
nofile: { soft: 65536, hard: 65536 } nofile: { soft: 65536, hard: 65536 }
environment: environment:
- UMASK=002 - UMASK=002
entrypoint: ["/bin/sh", "/scripts/start.sh"] # Scripts live in /config/chaptarr/scripts on the host (canonical copy:
# stacks/media/chaptarr/; scp on change). Not a ./ mount: that resolves to the
# Portainer-internal /data/compose/<id>/... path and binds an EMPTY dir.
entrypoint: ["/bin/sh", "/config/scripts/start.sh"]
command: ["dotnet", "/app/Chaptarr.dll", "-nobrowser", "-data=/config"] command: ["dotnet", "/app/Chaptarr.dll", "-nobrowser", "-data=/config"]
volumes: volumes:
- /config/chaptarr:/config - /config/chaptarr:/config
- /storage1:/storage1 - /storage1:/storage1
- ./chaptarr:/scripts:ro
ports: ports:
- "8789:8789" - "8789:8789"