-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhaproxy.cfg
More file actions
30 lines (26 loc) · 752 Bytes
/
Copy pathhaproxy.cfg
File metadata and controls
30 lines (26 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{% set image = salt['pillar.get']('haproxy-docker:image', 'utahdave/saltdemo:latest') -%}
{% set image_installs = salt['mine.get_docker'](interfaces="eth0") -%}
global
maxconn 2000
user haproxy
group haproxy
defaults
mode http
option redispatch
timeout connect 5000
timeout client 10000
timeout server 10000
listen dockapache 0.0.0.0:80
mode http
stats enable
stats uri /haproxy?stats
stats realm Strictly\ Private
stats auth saltstack:saltstack
balance roundrobin
option httpclose
option forwardfor
{% for image_name, info in image_installs.items() if 'ipv4' in info -%}
{% for ip_ in info['ipv4'][80] %}
server container{{loop.index}} {{ip_}} check
{% endfor -%}
{% endfor %}