From 1e0b9301747a48d7a51d5d088ac5df16bde878c0 Mon Sep 17 00:00:00 2001 From: Marius Gundersen Date: Tue, 13 Oct 2015 21:48:59 +0200 Subject: [PATCH 1/2] trim whitespace from host and port based on latest docker-gen --- nginx.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx.tmpl b/nginx.tmpl index 6300d89..255cc35 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -144,7 +144,7 @@ server { {{ end }} location / { - proxy_pass {{ $proto }}://{{ $host }}; + proxy_pass {{ trim $proto }}://{{ trim $host }}; {{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }} auth_basic "Restricted {{ $host }}"; auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }}; @@ -170,7 +170,7 @@ server { {{ end }} location / { - proxy_pass {{ $proto }}://{{ $host }}; + proxy_pass {{ trim $proto }}://{{ trim $host }}; {{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }} auth_basic "Restricted {{ $host }}"; auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }}; From 3e530a07841a7ecbd68ab4e4102001e070d174d2 Mon Sep 17 00:00:00 2001 From: Marius Gundersen Date: Tue, 13 Oct 2015 21:49:19 +0200 Subject: [PATCH 2/2] Use latest docker-gen --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cc80e08..c35c777 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf \ RUN wget -P /usr/local/bin https://godist.herokuapp.com/projects/ddollar/forego/releases/current/linux-amd64/forego \ && chmod u+x /usr/local/bin/forego -ENV DOCKER_GEN_VERSION 0.4.1 +ENV DOCKER_GEN_VERSION 0.4.2 RUN wget https://github.com/jwilder/docker-gen/releases/download/$DOCKER_GEN_VERSION/docker-gen-linux-amd64-$DOCKER_GEN_VERSION.tar.gz \ && tar -C /usr/local/bin -xvzf docker-gen-linux-amd64-$DOCKER_GEN_VERSION.tar.gz \