add static route for main.css
Some checks failed
Build and publish the docker image / build (push) Failing after 10s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-01-20 05:54:35 +03:00
parent f4dd0995a7
commit 314b237bb7
9 changed files with 19 additions and 21 deletions

View File

@ -40,16 +40,10 @@ impl Settings {
let mut s = Config::builder();
// setting default values
const CURRENT_DIR: &str = "./config.toml";
const ETC: &str = "/etc/libmedium/config.toml";
if let Ok(path) = env::var("LIBMEDIUM") {
s = s.add_source(File::with_name(&path));
} else if Path::new(CURRENT_DIR).exists() {
// merging default config from file
s = s.add_source(File::with_name(CURRENT_DIR));
} else if Path::new(ETC).exists() {
s = s.add_source(File::with_name(ETC));
} else if Path::new("./config.toml").exists() {
s = s.add_source(File::with_name("./config.toml");
} else {
log::warn!("configuration file not found");
}