Browse Source

Use correct label for ports

master
Chris Smith 5 years ago
parent
commit
284a446bc8
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      templates/haproxy.cfg.tpl

+ 3
- 3
templates/haproxy.cfg.tpl View File

23
     redirect scheme https code 301 if !{ ssl_fc }
23
     redirect scheme https code 301 if !{ ssl_fc }
24
     http-response set-header Strict-Transport-Security max-age=15768000
24
     http-response set-header Strict-Transport-Security max-age=15768000
25
 {{ range .Containers }}
25
 {{ range .Containers }}
26
-    {{- if index .Labels "com.chameth.port" -}}
26
+    {{- if index .Labels "com.chameth.proxy" -}}
27
         {{- if index .Labels "com.chameth.vhost" }}
27
         {{- if index .Labels "com.chameth.vhost" }}
28
     use_backend {{ .Name }} if { hdr(host) -i {{ index .Labels "com.chameth.vhost" | split "," | join " || hdr(host) -i " }} }
28
     use_backend {{ .Name }} if { hdr(host) -i {{ index .Labels "com.chameth.vhost" | split "," | join " || hdr(host) -i " }} }
29
         {{- end -}}
29
         {{- end -}}
30
     {{- end -}}
30
     {{- end -}}
31
 {{ end }}
31
 {{ end }}
32
 {{ range .Containers }}
32
 {{ range .Containers }}
33
-    {{- if index .Labels "com.chameth.port" }}
33
+    {{- if index .Labels "com.chameth.proxy" }}
34
 backend {{ .Name }}
34
 backend {{ .Name }}
35
     mode http
35
     mode http
36
-    server server1 {{ .Name }}:{{ index .Labels "com.chameth.port" }} check resolvers docker_resolver
36
+    server server1 {{ .Name }}:{{ index .Labels "com.chameth.proxy" }} check resolvers docker_resolver
37
     {{- end -}}
37
     {{- end -}}
38
 {{ end }}
38
 {{ end }}

Loading…
Cancel
Save