mirror of
https://github.com/GNS3/gns3-registry.git
synced 2025-01-18 18:56:38 +00:00
Add haproxy alpine container
This commit is contained in:
parent
19ab311e02
commit
6382383df2
7
docker/haproxy/Dockerfile
Normal file
7
docker/haproxy/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM alpine
|
||||
RUN apk update
|
||||
RUN apk add haproxy
|
||||
RUN mkdir /etc/haproxy
|
||||
ADD haproxy.cfg /etc/haproxy/haproxy.cfg
|
||||
VOLUME /etc/haproxy/
|
||||
CMD /usr/sbin/haproxy -fdV /etc/haproxy/haproxy.cfg
|
46
docker/haproxy/haproxy.cfg
Normal file
46
docker/haproxy/haproxy.cfg
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Global settings
|
||||
#---------------------------------------------------------------------
|
||||
global
|
||||
pidfile /var/run/haproxy.pid
|
||||
maxconn 4000
|
||||
user haproxy
|
||||
group haproxy
|
||||
#daemon
|
||||
debug
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# common defaults that all the 'listen' and 'backend' sections will
|
||||
# use if not designated in their block
|
||||
#---------------------------------------------------------------------
|
||||
defaults
|
||||
mode http
|
||||
option http-server-close
|
||||
option forwardfor except 127.0.0.0/8
|
||||
option redispatch
|
||||
retries 3
|
||||
timeout http-request 10s
|
||||
timeout queue 1m
|
||||
timeout connect 10s
|
||||
timeout client 1m
|
||||
timeout server 1m
|
||||
timeout http-keep-alive 10s
|
||||
timeout check 10s
|
||||
maxconn 3000
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# main frontend which proxys to the backends
|
||||
#---------------------------------------------------------------------
|
||||
frontend main
|
||||
bind *:80
|
||||
default_backend app
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# round robin balancing between the various backends
|
||||
#---------------------------------------------------------------------
|
||||
backend app
|
||||
balance roundrobin
|
||||
server app1 192.168.41.1:80 check
|
||||
server app2 192.168.41.2:80 check
|
||||
server app3 192.168.41.3:80 check
|
Loading…
Reference in New Issue
Block a user