summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-01-09 11:33:53 +0200
committerPaul Buetow <paul@buetow.org>2026-01-09 19:40:51 +0200
commit42a21f794f7082d3ddb6e7906d2a373c8135dd9f (patch)
tree40dc59e08fdae116542b6322a92aa75c7cfe66b6
parent01fcc8e47845f24f0ba16fcd14d30051758503d7 (diff)
Remove 'user nginx;' directive to fix nginx worker errors
When running as root with fsGroup, nginx workers fail trying to setgid. Remove the 'user nginx;' directive from nginx.conf at startup using sed. This allows nginx to run workers as root without permission errors.
-rw-r--r--f3s/git-server/helm-chart/templates/deployment.yaml2
1 files changed, 2 insertions, 0 deletions
diff --git a/f3s/git-server/helm-chart/templates/deployment.yaml b/f3s/git-server/helm-chart/templates/deployment.yaml
index c077aa5..12a235a 100644
--- a/f3s/git-server/helm-chart/templates/deployment.yaml
+++ b/f3s/git-server/helm-chart/templates/deployment.yaml
@@ -69,6 +69,8 @@ spec:
command: ["/bin/sh", "-c"]
args:
- |
+ # Remove 'user nginx;' directive to avoid setgid errors when running as root
+ sed -i 's/^user nginx;//' /etc/nginx/nginx.conf
spawn-fcgi -s /var/run/fcgiwrap.sock -n -- /usr/bin/fcgiwrap &
exec nginx -g 'daemon off;'
ports: