mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 09:48:14 +00:00
chore: Remove support for legacy swarm
It doesn't work with the newer Docker Swarm mode so it doesn't have much value anymore.
This commit is contained in:
parent
1462ff019d
commit
2494e20784
16
nginx.tmpl
16
nginx.tmpl
@ -137,15 +137,8 @@ upstream {{ .Upstream }} {
|
|||||||
# bypass nginx-proxy and access the container's server
|
# bypass nginx-proxy and access the container's server
|
||||||
# directly.
|
# directly.
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if $container.Node.ID }}
|
|
||||||
# Swarm node name: {{ $container.Node.Name }}
|
|
||||||
{{- end }}
|
|
||||||
# Container networks:
|
# Container networks:
|
||||||
{{- range $containerNetwork := sortObjectsByKeysAsc $container.Networks "Name" }}
|
{{- range $containerNetwork := sortObjectsByKeysAsc $container.Networks "Name" }}
|
||||||
{{- if eq $containerNetwork.Name "ingress" }}
|
|
||||||
# {{ $containerNetwork.Name }} (ignored)
|
|
||||||
{{- continue }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and (not (index $networks $containerNetwork.Name)) (not $networks.host) }}
|
{{- if and (not (index $networks $containerNetwork.Name)) (not $networks.host) }}
|
||||||
# {{ $containerNetwork.Name }} (unreachable)
|
# {{ $containerNetwork.Name }} (unreachable)
|
||||||
{{- continue }}
|
{{- continue }}
|
||||||
@ -162,14 +155,7 @@ upstream {{ .Upstream }} {
|
|||||||
{{- continue }}
|
{{- continue }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
# {{ $containerNetwork.Name }} (reachable)
|
# {{ $containerNetwork.Name }} (reachable)
|
||||||
{{- /*
|
{{- if and $containerNetwork $containerNetwork.IP }}
|
||||||
* If we got the containers from swarm and this container's
|
|
||||||
* port is published to host, use host IP:PORT.
|
|
||||||
*/}}
|
|
||||||
{{- if and $container.Node.ID $addr_obj $addr_obj.HostPort }}
|
|
||||||
{{- $ip = $container.Node.Address.IP }}
|
|
||||||
{{- $port = $addr_obj.HostPort }}
|
|
||||||
{{- else if and $containerNetwork $containerNetwork.IP }}
|
|
||||||
{{- $ip = $containerNetwork.IP }}
|
{{- $ip = $containerNetwork.IP }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
# /!\ No IP for this network!
|
# /!\ No IP for this network!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user