diff --git a/charts/nextcloud/templates/deployment.yaml b/charts/nextcloud/templates/deployment.yaml index 68a99692..b294d09d 100644 --- a/charts/nextcloud/templates/deployment.yaml +++ b/charts/nextcloud/templates/deployment.yaml @@ -239,8 +239,13 @@ spec: mountPath: /var/www/html/themes subPath: {{ ternary "themes" (printf "%s/%s" .Values.nextcloud.persistence.subPath "themes") (empty .Values.nextcloud.persistence.subPath) }} - name: nextcloud-nginx-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf + mountPath: /etc/nginx/conf.d/default.conf + subPath: default.conf + {{- if .Values.nginx.config.custom }} + - name: nextcloud-nginx-config + mountPath: /etc/nginx/conf.d/custom.conf + subPath: custom.conf + {{- end }} {{- if .Values.nextcloud.extraVolumeMounts }} {{- toYaml .Values.nextcloud.extraVolumeMounts | nindent 8 }} {{- end }} diff --git a/charts/nextcloud/templates/nginx-config.yaml b/charts/nextcloud/templates/nginx-config.yaml index bb96b94c..65983b9f 100644 --- a/charts/nextcloud/templates/nginx-config.yaml +++ b/charts/nextcloud/templates/nginx-config.yaml @@ -9,36 +9,9 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} data: - nginx.conf: |- {{- if .Values.nginx.config.default }} - worker_processes auto; - - error_log /var/log/nginx/error.log warn; - pid /var/run/nginx.pid; - - - events { - worker_connections 1024; - } - - + nginx.conf: |- http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - #tcp_nopush on; - - keepalive_timeout 65; - - #gzip on; - upstream php-handler { server 127.0.0.1:9000; } @@ -169,7 +142,9 @@ data: } } } -{{- else }} +{{- end }} +{{- if .Values.nginx.config.custom }} + custom.conf: |- {{ .Values.nginx.config.custom | indent 4 }} {{- end }} {{- end }}