summaryrefslogtreecommitdiff
path: root/docker/hautoproxy/haproxy.cfg.tmpl
blob: cd1174b21966fcf5fc0e4d4da7514f973079b402 (plain)
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
global
    daemon
    maxconn 4096
    pidfile /var/run/haproxy.pid

defaults
    mode tcp
    timeout connect 5s
    timeout client 1m
    timeout server 1m
    option redispatch
    balance roundrobin

listen stats :1936
    mode http
    stats enable
    stats hide-version
    #stats realm Haproxy\ Statistics
    stats uri /
    #stats auth Username:Password

{% for service in services %}
listen {{ service.service_name }}
    bind 127.0.0.1:{{service.local_port}}
    server {{ service.remote_name }} {{ service.remote_addr }}:{{ service.remote_port}} check inter 2s rise 3 fall 2
{% endfor %}