zammad-docker-compose/kubernetes/30_configmap_nginx.yaml
André Bauer 1f5c9036c2 - fixed ipv6 in google kubernetes engine
- replaced wget with curl
- made zammad image smaller by using tar.gz install instead of git clone
- moved sed commands to entrypoint
- added variables to entrypoint to set used servers dynamically
- added kubernetes backup cronjob
- added postgresql volume to compose file
- write nginx logs to stdout & stderr
- create zammad user & group manually with uid/gid 1000
2017-12-03 19:41:55 +01:00

60 lines
1.5 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-configmap
namespace: zammad
data:
config: |-
#
# kubernetes nginx config for zammad
#
server_tokens off;
upstream zammad-railsserver {
server localhost:3000;
}
upstream zammad-websocket {
server localhost:6042;
}
server {
listen 80;
server_name _;
root /opt/zammad/public;
access_log /dev/stdout;
error_log /dev/stderr;
client_max_body_size 50M;
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
expires max;
}
location /ws {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header CLIENT_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 86400;
proxy_pass http://zammad-websocket;
}
location / {
proxy_set_header Host $http_host;
proxy_set_header CLIENT_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 180;
proxy_pass http://zammad-railsserver;
gzip on;
gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
gzip_proxied any;
}
}