From 9d594cc6408ea705d8a7d229fdb807743dcc9545 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 17 Oct 2020 09:24:16 -0500 Subject: [PATCH] allow setting config file location via env var --- detect_objects.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/detect_objects.py b/detect_objects.py index d8813123f..d710ee12e 100644 --- a/detect_objects.py +++ b/detect_objects.py @@ -25,6 +25,8 @@ from frigate.edgetpu import EdgeTPUProcess FRIGATE_VARS = {k: v for k, v in os.environ.items() if k.startswith('FRIGATE_')} +CONFIG_FILE = os.environ.get('CONFIG_FILE', '/config/config.yml') + with open('/config/config.yml') as f: CONFIG = yaml.safe_load(f)