mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 13:05:32 +09:00
feat(config): read secrets from NAME_FILE variables (#1421)
Co-authored-by: Hampus <[email protected]>
This commit is contained in:
1 parent
cc5545c333
commit
0c4f016ba2
17 files changed
+534
-31
No files matched your search
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
use fluxer_svc::config::optional_env;
|
||||
use hmac::{KeyInit, Mac};
|
||||
use std::sync::{LazyLock, OnceLock};
|
||||
|
||||
@@ -46,8 +47,8 @@ pub fn configure(secret: Option<String>, environment: Option<&str>) -> anyhow::R
|
||||
|
||||
pub fn configure_from_env() -> anyhow::Result<()> {
|
||||
configure(
|
||||
std::env::var(SECRET_ENV).ok(),
|
||||
std::env::var("FLUXER_ENV").ok().as_deref(),
|
||||
optional_env(SECRET_ENV),
|
||||
optional_env("FLUXER_ENV").as_deref(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user