This commit is contained in:
Thomas LÉVEIL 2017-05-06 12:55:24 +00:00 committed by GitHub
commit 6397a7a7d6

View file

@ -1,5 +1,22 @@
{{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }} {{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }}
{{/* When docker-gen is running from a separated container and with the
-only-exposed (or -only-published) option, the template won't be provided
with the current (docker-gen) container info, making $currentContainer `null`.
*/}}
{{ if not $CurrentContainer }}
###############################################################################
# #
# Are you using using jwilder/nginx-proxy's nginx.tmpl with docker-gen #
# running in a separated container? #
# #
# Consider removing the docker-gen `-only-exposed` option and make sure #
# the docker-gen container has access to the same networks as the nginx #
# container. #
# #
###############################################################################
{{ end }}
{{ define "upstream" }} {{ define "upstream" }}
{{ if .Address }} {{ if .Address }}
{{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}} {{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}}