Minor doc changes
This commit is contained in:
@@ -24,12 +24,47 @@ npm run dev
|
||||
npm run dev -- --open
|
||||
```
|
||||
|
||||
## Building
|
||||
## Nix Deployment
|
||||
|
||||
To create a production version of your app:
|
||||
I use Caddy for TLS.
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
plebsaber.stream {
|
||||
reverse_proxy http://127.0.0.1:8037
|
||||
}
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
||||
I use sops-nix to deploy the flake with OAuth secrets.
|
||||
|
||||
```js
|
||||
sops = {
|
||||
defaultSopsFile = ./sops.yaml;
|
||||
secrets = {
|
||||
"plebsaber-stream.env" = {
|
||||
sopsFile = ../_sops/plebsaber-stream.env;
|
||||
format = "dotenv";
|
||||
restartUnits = [ "plebsaber-stream.service" ];
|
||||
};
|
||||
}
|
||||
};
|
||||
services.plebsaber-stream = {
|
||||
enable = true;
|
||||
environmentFile = config.sops.secrets."plebsaber-stream.env".path;
|
||||
};
|
||||
```
|
||||
|
||||
Then add the flake from this repository into your flake inputs.
|
||||
|
||||
```js
|
||||
inputs.plebsaber-stream = {
|
||||
url = "git+https://git.plebsaber.stream/pleb/plebsaber.stream.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
```
|
||||
|
||||
For updates, push commits to a repository and then update your flake.
|
||||
|
||||
```sh
|
||||
nix flake lock --update-input plebsaber-stream
|
||||
nixos-rebuild test .#webserver
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user