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.