diff options
Diffstat (limited to 'code/utils/config.py')
-rw-r--r-- | code/utils/config.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/code/utils/config.py b/code/utils/config.py index 491677d..f3fc971 100644 --- a/code/utils/config.py +++ b/code/utils/config.py @@ -2,6 +2,7 @@ import jsonschema import validators import yaml import sys +import os import logging import requests import sqlite3 @@ -103,8 +104,13 @@ def load_config() -> None: If the file does not exist, generate it """ database_setup() + if os.path.exists("/.dockerenv"): + file_path = "/config/config.yaml" + else: + file_path = "config.yaml" + try: - with open("config.yaml", "r") as f: + with open(file_path, "r") as f: contents = f.read() validate_config(contents) |