Document env vars
This commit is contained in:
parent
bba9a56329
commit
adcfd88471
22
docs/ENV-VARS.md
Normal file
22
docs/ENV-VARS.md
Normal file
@ -0,0 +1,22 @@
|
||||
# Useful Environment Variables
|
||||
|
||||
Plume relies on some environment variables for some configuration options. You can either set them before
|
||||
starting the app with `cargo run` or write them in a `.env` file to have automatically loaded.
|
||||
|
||||
Here are the variables that Plume uses:
|
||||
|
||||
- `BASE_URL`: the domain name, or IP and port on which Plume is listening. It is used in all federation-related code.
|
||||
- `DB_URL`: the URL of the PostgreSQL database, used by Plume (`postgres://plume:plume@localhost/plume` by default).
|
||||
- `POSTGRES_USER`: if you just want to use a different PostgreSQL user name, and keep the rest of the default URL.
|
||||
- `POSTGRES_PASSWORD`: same as `POSTGRES_USER`, but for the password.
|
||||
- `USE_HTTPS`: if it is `0`, federation and medias will be using HTTP by default (`1` by default).
|
||||
- `ROCKET_ADDRESS`: the adress on which Plume should listen (`0.0.0.0` by default).
|
||||
- `ROCKET_PORT`: the port on which Plume should listen ([`7878` by default](https://twitter.com/ag_dubs/status/852559264510070784))
|
||||
- `ROCKET_SECRET_KEY`: key used to sign private cookies and for CSRF protection. If it is not set, it will be regenerated everytime you restart Plume,
|
||||
meaning that all your users will get disconnected. You can generate one with `openssl rand -base64 32`.
|
||||
|
||||
## Diesel
|
||||
|
||||
Diesel, the tool we use to run migrations may be configured with the `DATABASE_URL` which should contain the URL of the
|
||||
PostgreSQL database. Otherwise, you can specify `--database-url YOUR-URL` everytime you run a `diesel` command.
|
||||
|
@ -2,5 +2,6 @@
|
||||
|
||||
- [Installing Plume (for development or production)](INSTALL.md)
|
||||
- [Updating your instance](UPDATE.md)
|
||||
- [Useful Environment Variables](ENV-VARS.md)
|
||||
- [Development Guide](DEVELOPMENT.md)
|
||||
- [Making Plume available in your language](INTERNATIONALIZATION.md)
|
||||
|
Loading…
Reference in New Issue
Block a user