1
0
This commit is contained in:
2022-02-22 01:54:48 +01:00
commit afcfd8613c
6 changed files with 609 additions and 0 deletions

3
haproxy/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM haproxy:2.5.3
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg

23
haproxy/haproxy.cfg Normal file
View File

@ -0,0 +1,23 @@
# This is a default haproxy config, for the initial start of haproxy when there are no containers around or docker-gen is starting
global
user haproxy
group haproxy
daemon
maxconn 1024
defaults
balance roundrobin
timeout client 60s
timeout connect 60s
timeout server 60s
frontend http
bind :8080
mode http
use_backend http
backend http
balance leastconn
mode http
server container1 container1:80 check
server container2 container2:80 check