mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-26 19:41:29 +08:00
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:
10
docker/main/rootfs/usr/local/nginx/get_base_path.py
Normal file
10
docker/main/rootfs/usr/local/nginx/get_base_path.py
Normal 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))
|
Reference in New Issue
Block a user