Skip to content

Commit 226bfe1

Browse files
authored
Merge pull request nginx-proxy#926 from Paike/patch-1
Fallback if container has no IP
2 parents 3fab237 + 3156b97 commit 226bfe1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nginx.tmpl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
{{ end }}
1414
{{ else if .Network }}
1515
# {{ .Container.Name }}
16-
server {{ .Network.IP }} down;
16+
{{ if .Network.IP }}
17+
server {{ .Network.IP }} down;
18+
{{ else }}
19+
server 127.0.0.1 down;
20+
{{ end }}
1721
{{ end }}
22+
1823
{{ end }}
1924

2025
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the

0 commit comments

Comments
 (0)