feat(media): chaptarr hardlinks + keeps its own ebook copy

Chaptarr had /downloads, /ebooks and /audiobooks as separate bind mounts, so
hardlinks failed with EXDEV and every import was a full copy (each seeding
audiobook stored twice). Mount /storage1 once and symlink the old container
paths into it via an entrypoint wrapper, so nothing in chaptarr's DB changes.

/ebooks now points at /storage1/Media/Ebooks, chaptarr's own ebook folder.
A Custom Script hook hardlinks each new ebook into the CWA ingest folder, so
CWA deleting its ingest copy no longer makes chaptarr think the book is missing.

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:57:34 -06:00
1 parent 417cd3165f
commit 5d70a4e825
4 files changed
+73 -8

No files matched your search

+10 -5
View File
@@ -251,8 +251,12 @@ services:
# ============================================================ BOOKS
# Prowlarr -> chaptarr -> qbittorrent/nzbget (/storage1/complete). Chaptarr
# imports ebooks into the CWA ingest folder (CWA owns the Calibre library and
# deletes ingested files) and audiobooks straight into the ABS library.
# 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
# into the CWA ingest folder (CWA owns the Calibre library and deletes ingested
# files). Audiobooks go straight into the ABS library.
# /storage1 is mounted once and chaptarr/start.sh symlinks /downloads,
# /audiobooks, /ebooks into it — separate bind mounts break hardlinks (EXDEV).
# Storyteller reads both libraries read-only and writes aligned EPUBs to its
# own /data. Readarr is retired upstream — do not add it.
chaptarr:
@@ -266,11 +270,12 @@ services:
nofile: { soft: 65536, hard: 65536 }
environment:
- UMASK=002
entrypoint: ["/bin/sh", "/scripts/start.sh"]
command: ["dotnet", "/app/Chaptarr.dll", "-nobrowser", "-data=/config"]
volumes:
- /config/chaptarr:/config
- /storage1/complete:/downloads
- /storage1/complete/books-ingest:/ebooks
- /storage1/Media/Audiobooks:/audiobooks
- /storage1:/storage1
- ./chaptarr:/scripts:ro
ports:
- "8789:8789"