From dc86e686373b43760863d7a7766119bef87571dc Mon Sep 17 00:00:00 2001 From: Parker Date: Sun, 19 Jan 2025 23:53:26 -0600 Subject: Add Docker image --- code/utils/config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'code/utils/config.py') 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) -- cgit v1.2.3-70-g09d2