fix: settings location
This commit is contained in:
parent
e0bc04770b
commit
0e19df5c3e
2 changed files with 6 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -14,6 +14,6 @@ uv.lock
|
||||||
**/*.kdbx*
|
**/*.kdbx*
|
||||||
.compose_repository
|
.compose_repository
|
||||||
|
|
||||||
__pycache__/
|
deployment/
|
||||||
**/dist/
|
**/dist/
|
||||||
**/*.log
|
**/*.log
|
||||||
|
|
|
||||||
|
|
@ -51,4 +51,8 @@ class Settings(BaseSettings):
|
||||||
|
|
||||||
@lru_cache
|
@lru_cache
|
||||||
def get_settings() -> Settings:
|
def get_settings() -> Settings:
|
||||||
return Settings.from_yaml()
|
paths = ['deployment/config.yaml', 'config/config.yaml']
|
||||||
|
for path in paths:
|
||||||
|
if Path(path).exists():
|
||||||
|
return Settings.from_yaml(path)
|
||||||
|
raise Exception("Config file not found")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue