mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
drop support for environment variables
The configuration file is now the canonical way to, well, configure. This change is desirable because it gives us much more flexibility with how configuration is structured. Environment variables are insufficient because, for example, they're a flat namespace and have no built-in way to represent lists.
This commit is contained in:
parent
9b115b4110
commit
9a92a8047e
2 changed files with 2 additions and 14 deletions
|
|
@ -17,7 +17,7 @@ use axum_server::{
|
|||
bind, bind_rustls, tls_rustls::RustlsConfig, Handle as ServerHandle,
|
||||
};
|
||||
use figment::{
|
||||
providers::{Env, Format, Toml},
|
||||
providers::{Format, Toml},
|
||||
Figment,
|
||||
};
|
||||
use http::{
|
||||
|
|
@ -111,9 +111,7 @@ async fn try_main() -> Result<(), error::Main> {
|
|||
let args = args::parse();
|
||||
|
||||
// Initialize config
|
||||
let raw_config = Figment::new()
|
||||
.merge(Toml::file(&args.config).nested())
|
||||
.merge(Env::prefixed("GRAPEVINE_").global());
|
||||
let raw_config = Figment::new().merge(Toml::file(&args.config).nested());
|
||||
|
||||
let config = raw_config.extract::<Config>()?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue