add docs about standalone mode config

This commit is contained in:
glyph 2022-01-14 15:30:33 +02:00
parent 65dbc6bdd4
commit 6fb4a2406b
1 changed files with 5 additions and 3 deletions

View File

@ -25,7 +25,7 @@ Move into the repo and compile:
Run the tests:
`cargo test`
`ROCKET_DISABLE_AUTH=true PEACH_STANDALONE_MODE=false cargo test`
Move back to the `peach-workspace` directory:
@ -35,8 +35,6 @@ Run the binary:
`./target/release/peach-web`
_Note: Networking functionality requires peach-network microservice to be running._
### Environment
**Deployment Mode**
@ -47,6 +45,10 @@ The web application deployment mode is configured with the `ROCKET_ENV` environm
Other deployment modes are `dev` and `prod`. Read the [Rocket Environment Configurations docs](https://rocket.rs/v0.5-rc/guide/configuration/#environment-variables) for further information.
**Configuration Mode**
The web application can be run with a minimal set of routes and functionality (PeachPub - a simple sbot manager) or with the full-suite of capabilities, including network management and access to device statistics (PeachCloud). The mode is configured with the `PEACH_STANDALONE_MODE` environment variable: `true` or `false`. If the variable is unset or the value is incorrectly set, the application defaults to standalone mode.
**Authentication**
Authentication is disabled in `development` mode and enabled by default when running the application in `production` mode. It can be disabled by setting the `ROCKET_DISABLE_AUTH` environment variable to `true`: