mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-07-02 01:16:32 +02:00
just check for secret file specifically (#11877)
* just check for secret file specifically * add josh to funding
This commit is contained in:
parent
962d213699
commit
b3eab17f2c
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
github:
|
github:
|
||||||
- blakeblackshear
|
- blakeblackshear
|
||||||
- NickM-27
|
- NickM-27
|
||||||
|
- hawkeye217
|
||||||
|
@ -87,11 +87,7 @@ def get_jwt_secret() -> str:
|
|||||||
)
|
)
|
||||||
jwt_secret = os.environ.get(JWT_SECRET_ENV_VAR)
|
jwt_secret = os.environ.get(JWT_SECRET_ENV_VAR)
|
||||||
# check docker secrets
|
# check docker secrets
|
||||||
elif (
|
elif os.path.isfile(os.path.join("/run/secrets", JWT_SECRET_ENV_VAR)):
|
||||||
os.path.isdir("/run/secrets")
|
|
||||||
and os.access("/run/secrets", os.R_OK)
|
|
||||||
and JWT_SECRET_ENV_VAR in os.listdir("/run/secrets")
|
|
||||||
):
|
|
||||||
logger.debug(f"Using jwt secret from {JWT_SECRET_ENV_VAR} docker secret file.")
|
logger.debug(f"Using jwt secret from {JWT_SECRET_ENV_VAR} docker secret file.")
|
||||||
jwt_secret = Path(os.path.join("/run/secrets", JWT_SECRET_ENV_VAR)).read_text()
|
jwt_secret = Path(os.path.join("/run/secrets", JWT_SECRET_ENV_VAR)).read_text()
|
||||||
# check for the addon options file
|
# check for the addon options file
|
||||||
|
Loading…
Reference in New Issue
Block a user