fix docs to mention UI bundling

see #305
This commit is contained in:
Scott Lamb 2024-01-31 17:06:21 -08:00
parent 223da03e36
commit d1c033b46d
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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.