mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-28 09:41:20 +00:00
update haproxy
This commit is contained in:
parent
c7a4f2d632
commit
71f15ba289
@ -1,10 +0,0 @@
|
|||||||
#
|
|
||||||
# Dockerfile for haproxy-arm
|
|
||||||
#
|
|
||||||
|
|
||||||
FROM easypi/alpine-arm
|
|
||||||
MAINTAINER EasyPi Software Foundation
|
|
||||||
|
|
||||||
RUN apk add --no-cache haproxy
|
|
||||||
|
|
||||||
CMD ["haproxy", "-f", "/etc/haproxy/haproxy.cfg"]
|
|
@ -1,6 +0,0 @@
|
|||||||
haproxy:
|
|
||||||
image: easypi/haproxy-arm
|
|
||||||
volumes:
|
|
||||||
- ./haproxy.cfg:/etc/haproxy/haproxy.cfg
|
|
||||||
net: host
|
|
||||||
restart: always
|
|
@ -1,27 +0,0 @@
|
|||||||
# +- jp (:1081)
|
|
||||||
# |
|
|
||||||
# |- tw (:1082)
|
|
||||||
# frontend --- backend -+
|
|
||||||
# (*:1080) |- hk (:1083)
|
|
||||||
# |
|
|
||||||
# +- us (:1084)
|
|
||||||
|
|
||||||
global
|
|
||||||
maxconn 4000
|
|
||||||
|
|
||||||
defaults
|
|
||||||
mode tcp
|
|
||||||
timeout connect 5000ms
|
|
||||||
timeout client 50000ms
|
|
||||||
timeout server 50000ms
|
|
||||||
|
|
||||||
frontend front
|
|
||||||
bind *:1080
|
|
||||||
default_backend back
|
|
||||||
|
|
||||||
backend back
|
|
||||||
balance roundrobin
|
|
||||||
server jp 127.0.0.1:1081 weight 50
|
|
||||||
server tw 127.0.0.1:1082 weight 20
|
|
||||||
server hk 127.0.0.1:1083 weight 15
|
|
||||||
server us 127.0.0.1:1084 weight 15
|
|
@ -1,6 +1,8 @@
|
|||||||
haproxy:
|
version: "3.8"
|
||||||
image: haproxy:alpine
|
services:
|
||||||
volumes:
|
haproxy:
|
||||||
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
|
image: haproxy:alpine
|
||||||
net: host
|
volumes:
|
||||||
restart: always
|
- ./data:/usr/local/etc/haproxy
|
||||||
|
network_mode: host
|
||||||
|
restart: unless-stopped
|
||||||
|
@ -15,13 +15,21 @@ defaults
|
|||||||
timeout client 50000ms
|
timeout client 50000ms
|
||||||
timeout server 50000ms
|
timeout server 50000ms
|
||||||
|
|
||||||
|
frontend stats
|
||||||
|
mode http
|
||||||
|
bind *:8404
|
||||||
|
stats enable
|
||||||
|
stats uri /stats
|
||||||
|
stats refresh 15s
|
||||||
|
stats admin if TRUE
|
||||||
|
|
||||||
frontend front
|
frontend front
|
||||||
bind *:1080
|
bind *:1080
|
||||||
default_backend back
|
default_backend back
|
||||||
|
|
||||||
backend back
|
backend back
|
||||||
balance roundrobin
|
balance roundrobin
|
||||||
server jp 127.0.0.1:1081 weight 50
|
server jp 127.0.0.1:1081 check inter 30s
|
||||||
server tw 127.0.0.1:1082 weight 20
|
server tw 127.0.0.1:1082 check inter 30s
|
||||||
server hk 127.0.0.1:1083 weight 15
|
server hk 127.0.0.1:1083 check inter 30s
|
||||||
server us 127.0.0.1:1084 weight 15
|
server us 127.0.0.1:1084 check inter 30s
|
||||||
|
Loading…
Reference in New Issue
Block a user