Merge 58f71d7907 into 23a2c7d848
This commit is contained in:
commit
6397a7a7d6
1 changed files with 17 additions and 0 deletions
17
nginx.tmpl
17
nginx.tmpl
|
|
@ -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 */}}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue