From d1c033b46d65af6d5eeea19de0f6595bb121fa61 Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Wed, 31 Jan 2024 17:06:21 -0800 Subject: [PATCH] fix docs to mention UI bundling see #305 --- guide/build.md | 5 +++++ ref/config.md | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/guide/build.md b/guide/build.md index 607c264..c877bcf 100644 --- a/guide/build.md +++ b/guide/build.md @@ -95,6 +95,11 @@ $ cd .. $ sudo rsync --recursive --delete --chmod=D755,F644 ui/dist/ /usr/local/lib/moonfire-nvr/ui ``` +If you wish to bundle the UI into the binary, you can build the UI first and then pass +`--features=bundled-ui` when building the server. See also the +[release workflow](../.github/workflows/release.yml) which statically links SQLite and +(musl-based) libc for a zero-dependencies binary. + ### Running interactively straight from the working copy The author finds it convenient for local development to set up symlinks so that diff --git a/ref/config.md b/ref/config.md index dddebff..70d5145 100644 --- a/ref/config.md +++ b/ref/config.md @@ -100,7 +100,11 @@ At the top level, before any `[[bind]]` lines, the following keys are understood: * `dbDir`: path to the SQLite database directory. Defaults to `/var/lib/moonfire-nvr/db`. -* `uiDir`: path to the UI to serve. Defaults to `/usr/local/lib/moonfire-nvr/ui`. +* `uiDir`: UI to serve; can be a path. Defaults to the special value + `uiDir = { bundled = true }` if a UI was built into the binary, or + `/usr/local/lib/moonfire-nvr/ui` otherwise. Release builds have UIs + built in; you can replicate this yourself via `--features=bundled` or `--features=bundled-ui` + when [building the server](../guide/build.md). * `workerThreads`: number of [tokio](https://tokio.rs/) worker threads to use. Defaults to the number of CPUs on the system. This normally does not need to be changed, but reducing it may slightly lower idle CPU usage.