fix(media): refuse local disk when a NAS share is configured
CI / build (push) Has been cancelled

A bind-mounted host directory made the app report storage as ready while
media landed on the container host's local filesystem, so the NFS export was
never actually used. mediaStorage() now reads the mount table: a share written
as host:/export is only accepted when the media root is on a network
filesystem, otherwise uploads, edits and filing are blocked with the real
device and the fix. Settings and the Media page show the detected filesystem
and host-mount steps, README section 9 documents the OS-level mount (including
Docker-in-LXC) with docker-compose.nfs.yml as the alternative, and the E2E
suites use path-style shares for local test directories.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-21 00:45:36 +00:00
parent 2fc71883d7
commit 982f9048e1
14 changed files with 439 additions and 33 deletions
+6 -5
View File
@@ -2,11 +2,12 @@
* Runtime media-storage settings: where original photos and videos live.
*
* NFS is a mounted filesystem, not an upload API. The app writes to a path that
* must already be visible inside the container; the NFS export is mounted by
* the Docker host and bind-mounted in (see docker-compose.yml). The stored
* `nfsShare` is the human-readable export name so operators can confirm which
* filesystem they are writing to, while `archivePath` is the actual mounted
* path used by the archiver.
* must already be visible inside the container; the export is mounted either by
* the Docker daemon (docker-compose.nfs.yml) or on the Docker host and
* bind-mounted in (see docker-compose.yml). The stored `nfsShare` is the
* human-readable export name so operators can confirm which filesystem they are
* writing to, while `archivePath` is the actual mounted path used by the
* archiver. `mediaStorage()` cross-checks the two against the mount table.
*/
import { constants } from "node:fs";