mirror of
https://github.com/bec-project/bec_atlas.git
synced 2025-07-13 22:51:49 +02:00
refactor: moved func accounts to dedicated deployment dir
This commit is contained in:
@ -54,7 +54,8 @@ class MongoDBDatasource:
|
||||
Load the functional accounts to the database.
|
||||
"""
|
||||
functional_accounts_file = os.path.join(
|
||||
os.path.dirname(__file__), ".functional_accounts.json"
|
||||
os.path.dirname(os.path.dirname(os.path.dirname(__file__))),
|
||||
"deployment/.functional_accounts.json",
|
||||
)
|
||||
if not os.path.exists(functional_accounts_file):
|
||||
raise FileNotFoundError(
|
||||
|
@ -17,6 +17,10 @@ def load_env() -> dict:
|
||||
current_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
|
||||
env_file = os.path.join(current_dir, ".env.yaml")
|
||||
|
||||
if not os.path.exists(env_file):
|
||||
# check if there is an env file in the deployment directory
|
||||
env_file = os.path.join(os.path.dirname(os.path.dirname(__file__)), "deployment/.env.yaml")
|
||||
|
||||
if not os.path.exists(env_file):
|
||||
raise FileNotFoundError(f"Could not find .env file in {os.getcwd()} or {current_dir}")
|
||||
|
||||
|
Reference in New Issue
Block a user