Accept IDCOOP_CONFIG and IDCOOP_SECRETS to configure path of config/secrets file

This commit is contained in:
Olivier 'reivilibre' 2024-05-21 21:49:36 +01:00
parent 38848ad8d5
commit cee16de4d1
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ axum-client-ip = "0.4.0"
base64 = "0.21.5"
blake2 = "0.10.6"
chrono = "0.4.31"
clap = { version = "4.4.6", features = ["derive"] }
clap = { version = "4.4.6", features = ["derive", "env"] }
comfy-table = "7.1.0"
confique = { version = "0.2.4", features = ["toml"], default-features = false }
eyre = "0.6.8"

View File

@ -19,10 +19,10 @@ use tracing_subscriber::util::SubscriberInitExt;
#[command(version = env!("CARGO_PKG_VERSION"), author = env!("CARGO_PKG_AUTHORS"), about = env!("CARGO_PKG_DESCRIPTION"))]
struct Options {
/// Path to a config file in TOML format. Can be specified multiple times. Optional (all options can also be specified in env vars).
#[clap(short = 'c', long = "config")]
#[clap(short = 'c', long = "config", env = "IDCOOP_CONFIG")]
config_files: Vec<PathBuf>,
#[clap(short = 'S', long = "secrets")]
#[clap(short = 'S', long = "secrets", env = "IDCOOP_SECRETS")]
secret_files: Vec<PathBuf>,
#[clap(subcommand)]