diff --git a/CHANGELOG.md b/CHANGELOG.md index a86f441..f501ec0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v1.17.10-2] - 2021-02-12 + +## Added +- New volume `app.conf.d` for custom configuration of additional location endpoints #38 + +### Changed +- Add configuration for websocket connection #36 + ## [v1.17.10-1] - 2021-01-25 ### Changed - Update nginx to 1.17.10 #32 diff --git a/Dockerfile b/Dockerfile index 57044d8..d4c2699 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN set -x \ FROM registry.cloudogu.com/official/base:3.10.3-2 LABEL maintainer="sebastian.sdorra@cloudogu.com" \ NAME="official/nginx" \ - VERSION="1.17.10-1" + VERSION="1.17.10-2" ENV CES_CONFD_VERSION=0.5.0 \ CES_CONFD_TAR_SHA256="0f6e6dce9e2eac40319133000b5fce873009adfb459b7cfd43bfe4ed4096518b" \ diff --git a/dogu.json b/dogu.json index 63924e5..956414f 100644 --- a/dogu.json +++ b/dogu.json @@ -1,6 +1,6 @@ { "Name": "official/nginx", - "Version": "1.17.10-1", + "Version": "1.17.10-2", "DisplayName": "Nginx", "Description": "Nginx WebServer.", "Logo": "https://cloudogu.com/images/dogus/nginx.png", @@ -66,6 +66,13 @@ "Owner": "1000", "Group": "1000", "NeedsBackup": true + }, + { + "Name": "app.conf.d", + "Path": "/etc/nginx/app.conf.d", + "Owner": "1000", + "Group": "1000", + "NeedsBackup": true } ], "ExposedPorts": [ diff --git a/resources/etc/ces-confd/templates/app.conf.tpl b/resources/etc/ces-confd/templates/app.conf.tpl index df3dec0..dcc8e45 100644 --- a/resources/etc/ces-confd/templates/app.conf.tpl +++ b/resources/etc/ces-confd/templates/app.conf.tpl @@ -2,6 +2,7 @@ server { include /etc/nginx/include.d/ssl.conf; include /etc/nginx/include.d/errors.conf; include /etc/nginx/include.d/robots.conf; + include /etc/nginx/app.conf.d/*.conf; {{if .Maintenance}} location / { @@ -20,7 +21,13 @@ server { # https://github.com/cloudogu/ecosystem/issues/298 # https://stackoverflow.com/questions/28347184/upstream-timed-out-110-connection-timed-out-for-static-content proxy_http_version 1.1; - proxy_set_header Connection ""; + + # nginx.conf map handles connection_upgrade http_upgrade + proxy_set_header Connection $connection_upgrade; + proxy_set_header Upgrade $http_upgrade; + + proxy_read_timeout 1d; + # disable gzip encoding for proxy applications proxy_set_header Accept-Encoding identity; diff --git a/resources/etc/nginx/nginx.conf.tpl b/resources/etc/nginx/nginx.conf.tpl index e8f97b4..4d864cc 100644 --- a/resources/etc/nginx/nginx.conf.tpl +++ b/resources/etc/nginx/nginx.conf.tpl @@ -25,6 +25,12 @@ http { # Limit download size to 32gb proxy_max_temp_file_size 32768m; + # if the request wants to ugrade to websocket we map the header and set the Upgrade header + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + # logging {{ if not (.Config.Exists "disable_access_log") }} log_format main '$remote_addr - $remote_user [$time_local] "$request" '