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,16 +23,16 @@ frontend main
23 23
     redirect scheme https code 301 if !{ ssl_fc }
24 24
     http-response set-header Strict-Transport-Security max-age=15768000
25 25
 {{ range .Containers }}
26
-    {{- if index .Labels "com.chameth.port" -}}
26
+    {{- if index .Labels "com.chameth.proxy" -}}
27 27
         {{- if index .Labels "com.chameth.vhost" }}
28 28
     use_backend {{ .Name }} if { hdr(host) -i {{ index .Labels "com.chameth.vhost" | split "," | join " || hdr(host) -i " }} }
29 29
         {{- end -}}
30 30
     {{- end -}}
31 31
 {{ end }}
32 32
 {{ range .Containers }}
33
-    {{- if index .Labels "com.chameth.port" }}
33
+    {{- if index .Labels "com.chameth.proxy" }}
34 34
 backend {{ .Name }}
35 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 37
     {{- end -}}
38 38
 {{ end }}

Loading…
Cancel
Save