From d14f52c1724c966cdec927e5b6baeb0a3e90832f Mon Sep 17 00:00:00 2001 From: Alireza David Date: Fri, 28 Oct 2016 13:00:25 +0330 Subject: [PATCH] Add global upstream template support --- nginx.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nginx.tmpl b/nginx.tmpl index bf92ff0..38d3904 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -102,7 +102,9 @@ upstream {{ $host }} { {{ end }} {{ end }} - keepalive 10; + {{ if (exists "/etc/nginx/upstream/default") }} + include /etc/nginx/upstream/default; + {{ end }} } {{ $default_host := or ($.Env.DEFAULT_HOST) "" }}