|
@@ -4,6 +4,12 @@ metadata:
|
|
|
name: "nginx-configuration"
|
|
|
data:
|
|
|
protocol: {{ include "nginx.scheme" . }}
|
|
|
+ {{ $timeout := 60 }}
|
|
|
+ {{ $size := .Values.nextcloud.max_upload_size | default 3 }}
|
|
|
+ {{/* Safely access key as it is conditionaly shown */}}
|
|
|
+ {{ if hasKey .Values "nginxConfig" }}
|
|
|
+ {{ $timeout = .Values.nginxConfig.proxy_timeouts | default 60 }}
|
|
|
+ {{ end }}
|
|
|
nginx.conf: |-
|
|
|
events {}
|
|
|
http {
|
|
@@ -17,14 +23,14 @@ data:
|
|
|
server {
|
|
|
server_name localhost;
|
|
|
|
|
|
- listen 443 ssl http2;
|
|
|
- listen [::]:433 ssl http2;
|
|
|
+ listen {{ .Values.service.nodePort }} ssl http2;
|
|
|
+ listen [::]:{{ .Values.service.nodePort }} ssl http2;
|
|
|
|
|
|
ssl_certificate '/etc/nginx-certs/public.crt';
|
|
|
ssl_certificate_key '/etc/nginx-certs/private.key';
|
|
|
|
|
|
# maximum 3GB Upload File; change to fit your needs
|
|
|
- client_max_body_size 3G;
|
|
|
+ client_max_body_size {{ $size }}G;
|
|
|
|
|
|
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains; preload" always;
|
|
|
|
|
@@ -35,11 +41,11 @@ data:
|
|
|
}
|
|
|
|
|
|
location = /.well-known/carddav {
|
|
|
- return 301 $scheme://$host/remote.php/dav;
|
|
|
+ return 301 $scheme://$host:$server_port/remote.php/dav;
|
|
|
}
|
|
|
|
|
|
location = /.well-known/caldav {
|
|
|
- return 301 $scheme://$host/remote.php/dav;
|
|
|
+ return 301 $scheme://$host:$server_port/remote.php/dav;
|
|
|
}
|
|
|
|
|
|
location / {
|
|
@@ -59,9 +65,9 @@ data:
|
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
|
|
|
|
# Proxy timeouts
|
|
|
- proxy_connect_timeout 60s;
|
|
|
- proxy_send_timeout 60s;
|
|
|
- proxy_read_timeout 60s;
|
|
|
+ proxy_connect_timeout {{ $timeout }}s;
|
|
|
+ proxy_send_timeout {{ $timeout }}s;
|
|
|
+ proxy_read_timeout {{ $timeout }}s;
|
|
|
}
|
|
|
}
|
|
|
}
|