forked from Deuxfleurs/garage
Add environment variables equivalents for some CLI options.
This commit is contained in:
parent
93f8d59e4c
commit
0bc67f2ad0
1 changed files with 8 additions and 3 deletions
|
@ -30,15 +30,20 @@ use cli::*;
|
||||||
struct Opt {
|
struct Opt {
|
||||||
/// Host to connect to for admin operations, in the format:
|
/// Host to connect to for admin operations, in the format:
|
||||||
/// <public-key>@<ip>:<port>
|
/// <public-key>@<ip>:<port>
|
||||||
#[structopt(short = "h", long = "rpc-host")]
|
#[structopt(short = "h", long = "rpc-host", env = "GARAGE_RPC_HOST")]
|
||||||
pub rpc_host: Option<String>,
|
pub rpc_host: Option<String>,
|
||||||
|
|
||||||
/// RPC secret network key for admin operations
|
/// RPC secret network key for admin operations
|
||||||
#[structopt(short = "s", long = "rpc-secret")]
|
#[structopt(short = "s", long = "rpc-secret", env = "GARAGE_RPC_SECRET")]
|
||||||
pub rpc_secret: Option<String>,
|
pub rpc_secret: Option<String>,
|
||||||
|
|
||||||
/// Configuration file (garage.toml)
|
/// Configuration file (garage.toml)
|
||||||
#[structopt(short = "c", long = "config", default_value = "/etc/garage.toml")]
|
#[structopt(
|
||||||
|
short = "c",
|
||||||
|
long = "config",
|
||||||
|
env = "GARAGE_CONFIG_FILE",
|
||||||
|
default_value = "/etc/garage.toml"
|
||||||
|
)]
|
||||||
pub config_file: PathBuf,
|
pub config_file: PathBuf,
|
||||||
|
|
||||||
#[structopt(subcommand)]
|
#[structopt(subcommand)]
|
||||||
|
|
Loading…
Reference in a new issue