chore(docker): mount ~/Pictures read-write so file ops work; document

The first phase-11 file op (inline rename) returns EROFS today
because docker-compose mounts ~/Pictures read-only by default.
Lightroom-style file operations (rename, move, discard-pile empty)
all need to mutate the filesystem, so the right default is :rw.

Flips both the backend and worker mounts to :rw with an inline
comment explaining the trade-off, and adds a "Photo directory
mounts and permissions" section to the README that:
- States the default is now :rw
- Explains exactly which endpoints fail under :ro (rename, empty
  discard pile, future move/copy)
- Notes the implication: Mulita has full write access to whatever
  host directory ends up at /host/Pictures, same trust model as
  Lightroom's catalog folder

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 23:56:27 +02:00
parent 7c003bc92e
commit 9729391dcc
2 changed files with 32 additions and 2 deletions

View File

@@ -57,6 +57,31 @@ docker-compose up -d
4. Access the application at `http://localhost:3000` 4. Access the application at `http://localhost:3000`
### Photo directory mounts and permissions
Mulita is a Lightroom-style manager — file operations (rename, move,
discard, empty discard pile) need to mutate the filesystem under your
photo mounts. The default `docker-compose.yml` mounts:
- `${PHOTO_DIRS}``/photos` (read-write)
- `~/Pictures``/host/Pictures` (**read-write** by default so file
operations work on your system Pictures folder out of the box)
If you want a strict read-only library — for example pointing at a
network share or your authoritative archive — change `:rw` to `:ro`
on the mount in `docker-compose.yml`. Mulita will keep working for
browsing, rating, color labels, picks, heaps, and the discard flag,
but the following endpoints will return an error from the OS
(`EROFS` / `Read-only file system`):
- `PATCH /photos/{id}` with a new `filename` (rename)
- `DELETE /discard/empty` (file unlinks)
- Future move / copy endpoints
**Heads up**: with `:rw`, Mulita has full write access to whatever
host directory you mount under `~/Pictures`. Treat the same way you
would Lightroom's catalog folder.
## Architecture ## Architecture
The application consists of 5 Docker services: The application consists of 5 Docker services:

View File

@@ -24,7 +24,11 @@ services:
volumes: volumes:
- ./mulita.yml:/app/config/mulita.yml:ro - ./mulita.yml:/app/config/mulita.yml:ro
- ${PHOTO_DIRS:-./photos}:/photos:rw - ${PHOTO_DIRS:-./photos}:/photos:rw
- ~/Pictures:/host/Pictures:ro # NOTE: read-write — file operations (rename, move, discard,
# empty discard pile) need to mutate the filesystem. Flip to :ro
# if you want a strict read-only library; the rename / move /
# delete endpoints will then return EROFS.
- ~/Pictures:/host/Pictures:rw
- thumbs_data:/data/thumbs - thumbs_data:/data/thumbs
- proxies_data:/data/proxies - proxies_data:/data/proxies
- db_data:/data/db - db_data:/data/db
@@ -50,7 +54,8 @@ services:
volumes: volumes:
- ./mulita.yml:/app/config/mulita.yml:ro - ./mulita.yml:/app/config/mulita.yml:ro
- ${PHOTO_DIRS:-./photos}:/photos:rw - ${PHOTO_DIRS:-./photos}:/photos:rw
- ~/Pictures:/host/Pictures:ro # See backend service for the rationale on :rw.
- ~/Pictures:/host/Pictures:rw
- thumbs_data:/data/thumbs - thumbs_data:/data/thumbs
- proxies_data:/data/proxies - proxies_data:/data/proxies
- db_data:/data/db - db_data:/data/db