Move cover bytes to content-addressed filesystem storage #65
Reference in New Issue
Block a user
Delete Branch "issue-56-cover-filesystem"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #56
Summary
Moves Kagane cover bytes out of Postgres bytea storage into an immutable, content-addressed filesystem store. Reader-visible behavior remains unchanged: the existing session-gated route serves stored bytes, missing bytes use the existing browser fetch path, and no browser still returns a missing cover.
Changes
coverstable and recreates it with onlyaddress,path, andcontent_type. Existing byte rows are intentionally dropped.ab/cd/<sha256>). Writes use a temp file plus atomic link; reads validate the stored relative path before opening it.COVER_DIRrequired in runtime config and Compose. Compose passes it as a Docker build argument and volume target, so custom durable paths keep image ownership, runtime config, and the namedcover-datavolume aligned.store.Opencaller and documented configuration, deployment, backup, and troubleshooting behavior.Verification
go test ./...CGO_ENABLED=0 go build ./...docker build --build-arg COVER_DIR=/data/covers -t manga-bookmark-cover-check-custom ./backenddocker compose config --format jsonconfirms customCOVER_DIRis the volume targetgit diff --check origin/mainParents #47 and #55 remain open as required by #56.