mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
revert temp changes to config.py
This commit is contained in:
parent
b9640d1894
commit
5c9a8b55f2
1 changed files with 3 additions and 8 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import os
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
from typing import Optional
|
||||
|
||||
|
|
@ -9,16 +8,12 @@ def resolve_env_file() -> Optional[str]:
|
|||
env = os.getenv("ENVIRONMENT", "local")
|
||||
|
||||
if env == "local":
|
||||
env_file: Path = Path("backend/.env").resolve() # resolve to full path
|
||||
print("USING ENV FILE:", env_file)
|
||||
return str(env_file)
|
||||
return "backend/.env"
|
||||
|
||||
if env == "test":
|
||||
env_file: Path = Path("backend/.env.test").resolve()
|
||||
print("USING ENV FILE:", env_file)
|
||||
return str(env_file)
|
||||
return "backend/.env.test"
|
||||
|
||||
print("NO ENV FILE")
|
||||
# prod = no env file
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue