Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
osterman committed Dec 22, 2015
0 parents commit 3de513a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM ubuntu:14.04
RUN apt-get update && apt-get -y install haproxy
VOLUME /etc/haproxy
EXPOSE 9000
EXPOSE 9001
ADD haproxy.cfg /etc/haproxy/
CMD haproxy -f /etc/haproxy/haproxy.cfg -db
50 changes: 50 additions & 0 deletions haproxy.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
global
#log /dev/log local0
#log /dev/log local1 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon

defaults
#log global
mode http
#option httplog
#option dontlognull
contimeout 5000
clitimeout 50000
srvtimeout 50000

balance roundrobin
option abortonclose
option redispatch
retries 3

errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http

listen stats 0.0.0.0:9001 # Listen on all IP's on port 9000
mode http
balance
timeout client 5000
timeout connect 4000
timeout server 30000

stats enable
# This is the virtual URL to access the stats page
stats uri /haproxy_stats

# Authentication realm. This can be set to anything. Escape space characters with a backslash.
stats realm HAProxy\ Statistics

# The user/pass you want to use. Change this password!
stats auth admin:passwordhere

# This allows you to take down and bring up back end servers.
# This will produce an error on older versions of HAProxy.
stats admin if TRUE

0 comments on commit 3de513a

Please sign in to comment.