mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2024-11-25 06:15:39 +03:00
Merge branch 'TinfoilSubmarine-custom-env-path' into main
This commit is contained in:
commit
9a682b7a45
2 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,11 @@
|
|||
##
|
||||
## Be aware that most of these settings will be overridden if they were changed
|
||||
## in the admin interface. Those overrides are stored within DATA_FOLDER/config.json .
|
||||
##
|
||||
## By default, vaultwarden expects for this file to be named ".env" and located
|
||||
## in the current working directory. If this is not the case, the environment
|
||||
## variable ENV_FILE can be set to the location of this file prior to starting
|
||||
## vaultwarden.
|
||||
|
||||
## Main data folder
|
||||
# DATA_FOLDER=data
|
||||
|
|
|
@ -56,7 +56,7 @@ macro_rules! make_config {
|
|||
impl ConfigBuilder {
|
||||
#[allow(clippy::field_reassign_with_default)]
|
||||
fn from_env() -> Self {
|
||||
match dotenv::from_path(".env") {
|
||||
match dotenv::from_path(get_env("ENV_FILE").unwrap_or_else(|| String::from(".env"))) {
|
||||
Ok(_) => (),
|
||||
Err(e) => match e {
|
||||
dotenv::Error::LineParse(msg, pos) => {
|
||||
|
|
Loading…
Reference in a new issue