diff --git a/apps/zammad/nginx/default.conf b/apps/zammad/nginx/default.conf index 891f9e1..7fd04d6 100644 --- a/apps/zammad/nginx/default.conf +++ b/apps/zammad/nginx/default.conf @@ -1,7 +1,3 @@ -upstream php-handler { - server localhost:9000; -} - server { listen 443 ssl http2; listen [::]:443 ssl http2; @@ -25,13 +21,19 @@ server { gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; - root /opt/zammad/public; - location = /robots.txt { allow all; log_not_found off; access_log off; } + error_log /dev/stdout info; + access_log /dev/stdout; + + root /opt/zammad/public; + + location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico|apple-touch-icon.png) { + expires max; + } location /ws { proxy_http_version 1.1; diff --git a/apps/zammad/templates/deployment.yaml b/apps/zammad/templates/deployment.yaml index 5c808de..9daa6d7 100644 --- a/apps/zammad/templates/deployment.yaml +++ b/apps/zammad/templates/deployment.yaml @@ -108,6 +108,8 @@ spec: metadata: labels: app: {{ .Release.Name }}-zammad + annotations: + checksum/config: {{ include (print $.Template.BasePath "/nginxconf.yaml") . | sha256sum }} spec: initContainers: - name: wait-for-cert @@ -465,13 +467,6 @@ spec: backoffLimit: 3 --- apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ tpl .Values.identifier . }}-nginx-config -data: -{{ tpl (.Files.Glob "nginx/*").AsConfig . | indent 2 }} ---- -apiVersion: v1 kind: Secret metadata: name: {{ tpl .Values.identifier . }}-postgres-config diff --git a/apps/zammad/templates/nginxconf.yaml b/apps/zammad/templates/nginxconf.yaml new file mode 100644 index 0000000..699d7f6 --- /dev/null +++ b/apps/zammad/templates/nginxconf.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ tpl .Values.identifier . }}-nginx-config +data: +{{ tpl (.Files.Glob "nginx/*").AsConfig . | indent 2 }}