Explorar o código

allow setting config file location via env var

Blake Blackshear %!s(int64=4) %!d(string=hai) anos
pai
achega
9d594cc640
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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_')}
 
+CONFIG_FILE = os.environ.get('CONFIG_FILE', '/config/config.yml')
+
 with open('/config/config.yml') as f:
     CONFIG = yaml.safe_load(f)