From 810ff3ea8805565a03a5ec19562be708dfa85e34 Mon Sep 17 00:00:00 2001 From: nikashitsa Date: Thu, 21 Apr 2016 16:46:48 +0600 Subject: [PATCH] Fix for docker-compose v2 syntax --- nginx.tmpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nginx.tmpl b/nginx.tmpl index 255cc35..b07fe22 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -5,9 +5,12 @@ # {{ .Container.Node.Name }}/{{ .Container.Name }} server {{ .Container.Node.Address.IP }}:{{ .Address.HostPort }}; {{/* If there is no swarm node or the port is not published on host, use container's IP:PORT */}} - {{ else }} + {{ else if .Address.IP }} # {{ .Container.Name }} server {{ .Address.IP }}:{{ .Address.Port }}; + {{ else }} + # {{ .Container.Name }} + server {{ .Container.Name }}:{{ .Address.Port }}; {{ end }} {{ else }} # {{ .Container.Name }}