diff --git a/alpine/haproxy/Dockerfile b/alpine/haproxy/Dockerfile index 8aecd5e..a1c11c0 100644 --- a/alpine/haproxy/Dockerfile +++ b/alpine/haproxy/Dockerfile @@ -1,6 +1,7 @@ FROM alpine:latest ENV container docker -RUN apk update; apk upgrade; apk add haproxy +RUN apk update; apk upgrade; apk add haproxy tzdata COPY haproxy.cfg /etc/haproxy/haproxy.cfg +RUN ln -s /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime EXPOSE 41080 CMD [ "/usr/sbin/haproxy", "-f", "/etc/haproxy/haproxy.cfg", "-db" ] diff --git a/alpine/haproxy/README.md b/alpine/haproxy/README.md new file mode 100644 index 0000000..b2bc2cd --- /dev/null +++ b/alpine/haproxy/README.md @@ -0,0 +1,3 @@ +Access stats: + +http://192.168.86.208:44644/stats diff --git a/alpine/haproxy/haproxy.cfg b/alpine/haproxy/haproxy.cfg index b2352ca..161aff4 100644 --- a/alpine/haproxy/haproxy.cfg +++ b/alpine/haproxy/haproxy.cfg @@ -1,22 +1,31 @@ global - log 127.0.0.1 local2 - chroot /var/lib/haproxy - pidfile /var/run/haproxy.pid - maxconn 4000 - user haproxy - group haproxy - daemon - + log 192.168.86.10 local0 notice + chroot /var/lib/haproxy + pidfile /var/run/haproxy.pid + maxconn 600 + user haproxy + group haproxy + daemon + defaults + log global mode tcp timeout client 10s timeout connect 5s timeout server 10s +frontend stats + mode http + bind *:44644 + stats enable + stats uri /stats + stats refresh 10s + stats auth admin:qwerty-asdf-1234 + frontend socks-front bind *:41080 default_backend socks-back backend socks-back server appgate 192.168.86.22:9080 check - server gw2 192.168.86.2:11080 check backup + server ism 192.168.86.18:11080 check backup