diff --git a/.env.example b/.env.example
index be27c9a..143315e 100644
--- a/.env.example
+++ b/.env.example
@@ -70,21 +70,29 @@ OUTBOX_DIR=/tmp/outbox
# storage share below.
UPLOAD_DIR=/tmp/uploads
-# Primary storage for original event photos and videos. Mount the NFS export
-# (or any local directory) on the Docker host, then point MEDIA_ARCHIVE_DIR at
-# that host mount when starting compose:
-# MEDIA_ARCHIVE_DIR=/mnt/nfs/glenloch docker compose up -d
-# Then set the share name and folder in Settings → Media storage. Photo/video
-# uploads and photo editing stay disabled until that check passes; the app never
-# writes event media inside the container.
+# Primary storage for original event photos and videos. Mount the export at an
+# OS level on the Docker host, then point MEDIA_ARCHIVE_DIR at that mount:
+# sudo mount -t nfs nas.example.org:/export /mnt/glenloch-media
+# MEDIA_ARCHIVE_DIR=/mnt/glenloch-media docker compose up -d
+# Mount before starting the app: the bind is read at container start. Then set
+# the share name and folder in Settings → Media storage. Photo/video uploads and
+# photo editing stay blocked (with the reason) while a NAS-style share is not a
+# real network mount; the app never writes event media inside the container.
ARCHIVE_DIR=/archive
ARCHIVE_FOLDER=Glenloch Media
# Human-readable share, e.g. nas.local:/volume1/church-media or /mnt/media.
# Required in app settings (Settings → Media storage); this seeds the default.
NFS_SHARE=
-# Host path bind-mounted at /archive. Point this at real storage; the app blocks
-# media writes on a Docker-managed named volume.
+# Host path bind-mounted at /archive, e.g. /mnt/glenloch-media mounted from the
+# share. Point this at real storage; the app blocks media writes on a
+# Docker-managed named volume or a NAS-style share that is not a network mount.
MEDIA_ARCHIVE_DIR=
+# Alternative to the host mount: docker-compose.nfs.yml makes the Docker daemon
+# mount the export as the volume behind /archive. Needs mount permission (fails
+# with "operation not permitted" in an unprivileged LXC).
+NFS_ADDR=
+NFS_EXPORT=
+NFS_VERSION=4
# Observability (declared; no Sentry integration is wired yet)
SENTRY_DSN=
diff --git a/README.md b/README.md
index 83b556a..7b9ac4f 100644
--- a/README.md
+++ b/README.md
@@ -459,21 +459,43 @@ The daily job runs instances → slots → complete in that order. Run the scrip
Original event photos and videos are stored **only** on the configured media storage share — it is their primary home, not a backup. Without a named share and a writable mounted path, the uploader and the photo editor are disabled with a warning; the app never falls back to storing media inside the container or on the `archive-data` volume. Photos live in `
+ Filesystem {archiveStatus.mount.fileSystem} on{" "} + {archiveStatus.mount.mountPoint} +
+ )} )} diff --git a/src/app/(app)/settings/page.tsx b/src/app/(app)/settings/page.tsx index 5fe350e..bff0fe1 100644 --- a/src/app/(app)/settings/page.tsx +++ b/src/app/(app)/settings/page.tsx @@ -43,6 +43,7 @@ export default async function SettingsPage() { ? `Event photos and videos are stored in ${media.root}.` : media.message, freeBytes: media.ok ? media.freeBytes : null, + mount: media.ok ? media.mount : null, } : null; const emailTransport = emailSettings?.smtpConfigured diff --git a/src/components/app/storage-panel.tsx b/src/components/app/storage-panel.tsx index 4a15c46..2eab35d 100644 --- a/src/components/app/storage-panel.tsx +++ b/src/components/app/storage-panel.tsx @@ -26,6 +26,11 @@ export function StoragePanel({ ready: boolean; message: string; freeBytes: number | null; + mount?: { + device: string; + mountPoint: string; + fileSystem: string; + } | null; }; }) { const router = useRouter(); @@ -82,9 +87,55 @@ export function StoragePanel({ {formatBytes(status.freeBytes)} )} + {status.ready && status.mount && ( ++ Filesystem {status.mount.fileSystem} on{" "} + {status.mount.mountPoint} ({status.mount.device}) +
+ )} + {!status.ready && ( ++ How to fix: mount the export on the host +
+
+ The app cannot mount NFS itself. Mount the export at an OS-level
+ path on the Docker host, then restart the app so the container
+ binds that path at /archive:
+
+{`# on the Docker host (root)
+sudo mkdir -p /mnt/glenloch-media
+sudo mount -t nfs nas.example.org:/export /mnt/glenloch-media
+findmnt -T /mnt/glenloch-media -o TARGET,SOURCE,FSTYPE`}
+
+
+ Set MEDIA_ARCHIVE_DIR=/mnt/glenloch-media{" "}
+ in .env (mount first — bind mounts
+ are read when the container starts), then run{" "}
+ docker compose up -d app. Confirm
+ the container sees the share:
+
+{`docker compose exec app grep ' /archive ' /proc/self/mounts
+# nfs4 nas.example.org:/export /archive nfs4 rw,… ← good
+# zfs ssd-main/subvol-125-disk-0 /archive … ← still local disk`}
+
+
+ The export must let the container user (UID 100) write. Inside a
+ Proxmox LXC this needs either{" "}
+ pct set <ctid> -features mount=nfs,nesting=1{" "}
+ or mounting on the Proxmox host and passing it in with{" "}
+ pct set <ctid> -mp0 /mnt/glenloch-media,mp=/mnt/glenloch-media{" "}
+ — see README section 9. Alternatively let Docker mount the export
+ with docker-compose.nfs.yml.
+
This is primary storage for original photos and videos, not a backup.
- NFS is a mounted filesystem, not an upload API: mount the export on the
- Docker host, set MEDIA_ARCHIVE_DIR to
- that host path, then restart this stack. The path above must be the
- directory visible inside the app container (normally{" "}
- /archive).
+ The recommended setup is an OS-level mount of the export on the Docker
+ host, bind-mounted in with{" "}
+ MEDIA_ARCHIVE_DIR; letting Compose
+ mount it (docker-compose.nfs.yml) also
+ works. Either way, the path above must be the directory visible inside
+ the app container (normally /archive),
+ and a share written as host:/export{" "}
+ is only accepted when that directory is a network filesystem. The
+ filesystem line above shows what the container is really writing to.