Base path via environment variable (#17030)

* Base path via environment variable

* Feedback refactored

* Update docker/main/rootfs/usr/local/nginx/conf/nginx.conf

Co-authored-by: Blake Blackshear <blake.blackshear@gmail.com>

* Update docker/main/rootfs/usr/local/nginx/templates/base_path.gotmpl

Co-authored-by: Blake Blackshear <blake.blackshear@gmail.com>

* Revert api regex change

* Lint fix

* Fix https to http

* Base path documentation

* Base path contains leading slash

* Frigate specific environment variable

* Typo in comment

Co-authored-by: Blake Blackshear <blake.blackshear@gmail.com>

* Typo in comment

Co-authored-by: Blake Blackshear <blake.blackshear@gmail.com>

---------

Co-authored-by: Blake Blackshear <blake.blackshear@gmail.com>
This commit is contained in:
bartbutenaers
2025-03-17 16:29:38 +01:00
committed by GitHub
parent 95e141ed15
commit 61aef0bff0
5 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
"""Prints the base path as json to stdout."""
import json
import os
base_path = os.environ.get("FRIGATE_BASE_PATH", "")
result: dict[str, any] = {"base_path": base_path}
print(json.dumps(result))