Package a self-contained macOS app and harden serving

- Add macos/build.mjs: stages a universal .app outside the checkout, bundles
  and checksums Node, installs production deps per architecture, compiles the
  launcher shim, signs ad-hoc or with a Developer ID, and writes a zip and dmg
  with an optional notarization path.
- Serve precompressed brotli/gzip assets and split admin panels and the public
  pages out of the main bundle.
- Support HTTP range requests, and fix upload and quota accounting, gallery
  download counts and unreadable-file handling.
- Add server HTTP integration tests, a Gitea CI workflow, a catalog backup
  script and a crash screen for the UI.
This commit is contained in:
2026-11-29 06:23:58 +00:00
parent d42727618e
commit b34d34dacb
24 changed files with 2598 additions and 93 deletions
+63
View File
@@ -0,0 +1,63 @@
Luminary for macOS
==================
Install
1. Open the disk image (or unzip the archive).
2. Drag Luminary to the Applications folder.
3. Eject the disk image, then open Luminary from Applications.
First launch (unsigned build)
This build is not notarized by Apple, so macOS will say it cannot verify the
app. That is expected: it means nobody paid Apple's yearly fee, not that
anything is wrong with the file.
1. Double-click Luminary and dismiss the warning with Done.
2. Open System Settings > Privacy & Security.
3. Scroll to Security and click Open Anyway, then authenticate.
macOS remembers the choice, so this is a one-time step. The Open Anyway
button only appears for about an hour after the blocked attempt; if it is
missing, double-click the app again and go back.
What it needs
- macOS 11 Big Sur or newer (the build records its own minimum in
Info.plist; 11.0 for the Node 22 build, 13.5 for the Node 24 build).
- A browser with WebAssembly and WebGL2. Chrome or Edge is used for the app
window when installed; otherwise the default browser opens a normal tab.
- Nothing else. Node.js is inside the app, so no Homebrew, no npm install
and no administrator password are needed for day-to-day use.
Start, stop and status
Opening Luminary starts the local server and opens the editor. Opening it
again reuses the running copy instead of starting a second one.
- Stop Luminary.command (next to the app in the disk image) stops the server.
- The same commands are available from a terminal:
/Applications/Luminary.app/Contents/Resources/launcher.sh --status
/Applications/Luminary.app/Contents/Resources/launcher.sh --stop
(or run the app with --args --status: open -a Luminary --args --status)
Where your photos live
~/Library/Application Support/Luminary/data
That folder holds the SQLite catalog, the originals, previews and thumbnails.
Set LUMINARY_DATA before launching to keep it somewhere else, such as an
external drive. Back it up by copying the whole folder while Luminary is
stopped, including lumenroom.db, lumenroom.db-wal and lumenroom.db-shm.
Logs
~/Library/Application Support/Luminary/data/logs/server.out.log
~/Library/Application Support/Luminary/data/logs/server.err.log
Updating
Quit the server (Stop Luminary.command), drag the new Luminary.app over the
old one, and start it again. The data folder is outside the app and is not
touched. The catalog migrates itself on first start.
Notes
- The server listens on 127.0.0.1 only. For proofing galleries that other
devices should reach, run the server yourself with HOST=0.0.0.0.
- The app window is Chrome or Edge in app mode, using its own profile in the
data folder, so it does not mix with your normal browsing. Set
LUMINARY_WINDOW=browser to open a normal tab instead.
- This build is single-user desktop mode: it signs in as a local admin
without a password and is not meant for several people sharing one Mac
account.
- The bundle is ad-hoc signed. If you rebuild it yourself with a Developer ID
certificate and notarize it, the first-launch step above disappears.