Initial Docker Compose workflow for Tower cluster

The goal is to share a common pattern with the existing development work
This commit is contained in:
Matthew Jones
2016-09-08 10:18:14 -04:00
parent f3b7fe18ce
commit ebf103f345
6 changed files with 139 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
FROM haproxy:1.6-alpine
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg

View File

@@ -0,0 +1,36 @@
global
debug
stats socket /tmp/admin.sock
stats timeout 30s
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
frontend localnodes
bind *:8013
mode http
default_backend nodes
backend nodes
mode http
balance roundrobin
option forwardfor
option http-pretend-keepalive
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
option httpchk HEAD / HTTP/1.1\r\nHost:localhost
server tower_1 tower_1:8013 check
server tower_2 tower_2:8013 check
server tower_3 tower_3:8013 check
listen stats
bind *:1936
stats enable
stats uri /