forked from 2sys/shoutdotdev
change env separator from . to __
This commit is contained in:
parent
9abdf38b06
commit
f6adc2ba88
2 changed files with 12 additions and 12 deletions
22
example.env
22
example.env
|
@ -1,15 +1,15 @@
|
|||
RUST_LOG=debug
|
||||
DATABASE_URL=postgresql://shoutdotdev:callous@127.0.0.1:5447/shoutdotdev
|
||||
AUTH.CLIENT_ID=
|
||||
AUTH.CLIENT_SECRET=
|
||||
AUTH.REDIRECT_URL=http://localhost:3000/auth/callback
|
||||
AUTH.AUTH_URL=https://example.com/authorize
|
||||
AUTH.TOKEN_URL=https://example.com/token
|
||||
AUTH.USERINFO_URL=https://example.com/userinfo
|
||||
AUTH__CLIENT_ID=
|
||||
AUTH__CLIENT_SECRET=
|
||||
AUTH__REDIRECT_URL=http://localhost:3000/auth/callback
|
||||
AUTH__AUTH_URL=https://example.com/authorize
|
||||
AUTH__TOKEN_URL=https://example.com/token
|
||||
AUTH__USERINFO_URL=https://example.com/userinfo
|
||||
# The .env parser (dotenvy) requires quotes around any value with spaces. Note
|
||||
# that in this regard it is incompatible with Docker's --env-file parser.
|
||||
EMAIL.VERIFICATION_FROM=no-reply@shout.dev
|
||||
EMAIL.MESSAGE_FROM=no-reply@shout.dev
|
||||
EMAIL.SMTP.SERVER=smtp.example.com
|
||||
EMAIL.SMTP.USERNAME=
|
||||
EMAIL.SMTP.PASSWORD=
|
||||
EMAIL__VERIFICATION_FROM=no-reply@shout.dev
|
||||
EMAIL__MESSAGE_FROM=no-reply@shout.dev
|
||||
EMAIL__SMTP__SERVER=smtp.example.com
|
||||
EMAIL__SMTP__USERNAME=
|
||||
EMAIL__SMTP__PASSWORD=
|
||||
|
|
|
@ -103,7 +103,7 @@ impl Settings {
|
|||
}
|
||||
}
|
||||
let s = Config::builder()
|
||||
.add_source(Environment::default())
|
||||
.add_source(Environment::default().separator("__"))
|
||||
.build()
|
||||
.context("config error")?;
|
||||
Ok(s.try_deserialize().context("deserialize error")?)
|
||||
|
|
Loading…
Add table
Reference in a new issue