瀏覽代碼

allow setting config file location via env var

Blake Blackshear 4 年之前
父節點
當前提交
9d594cc640
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      detect_objects.py

+ 2 - 0
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_')}
 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:
 with open('/config/config.yml') as f:
     CONFIG = yaml.safe_load(f)
     CONFIG = yaml.safe_load(f)