mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-18 11:33:00 +03:00
strip nginx user directive when not running as root (#24925)
CI / AMD64 Build (push) Canceled after 0s
CI / AMD64 Smoke Test (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
CI / AMD64 Build (push) Canceled after 0s
CI / AMD64 Smoke Test (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
This commit is contained in:
@@ -80,6 +80,11 @@ cp -r /usr/local/nginx/conf/. /tmp/nginx/conf/
|
|||||||
|
|
||||||
set_worker_processes
|
set_worker_processes
|
||||||
|
|
||||||
|
# A non-root master ignores `user` and warns on every start
|
||||||
|
if [[ "$runs_as_root" -eq 0 ]]; then
|
||||||
|
sed -i '/^user root;$/d' /tmp/nginx/conf/nginx.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# TLS certs: user-mounted certs at /etc/letsencrypt/live/frigate (documented
|
# TLS certs: user-mounted certs at /etc/letsencrypt/live/frigate (documented
|
||||||
# contract) always win; otherwise fall back to a self-signed cert persisted in
|
# contract) always win; otherwise fall back to a self-signed cert persisted in
|
||||||
# /config/tls, which stays writable under a read-only root filesystem.
|
# /config/tls, which stays writable under a read-only root filesystem.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# file, all other path directives follow --prefix and must stay absolute.
|
# file, all other path directives follow --prefix and must stay absolute.
|
||||||
|
|
||||||
daemon off;
|
daemon off;
|
||||||
# ignored by a non-root master; keeps workers root under FRIGATE_RUN_AS_ROOT
|
# keeps workers root under FRIGATE_RUN_AS_ROOT; the run script strips it otherwise
|
||||||
user root;
|
user root;
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user