fix haproxy
This commit is contained in:
@@ -67,18 +67,20 @@ services:
|
||||
- app-network
|
||||
ports:
|
||||
- "21:21"
|
||||
- "30000-30009:30000-30009"
|
||||
- "40000-40499:40000-40499"
|
||||
- "8404:8404"
|
||||
keepalived:
|
||||
image: osixia/keepalived:2.0.20
|
||||
image: alpine:latest
|
||||
container_name: keepalived
|
||||
restart: unless-stopped
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- NET_BROADCAST
|
||||
- NET_RAW
|
||||
network_mode: host
|
||||
environment:
|
||||
KEEPALIVED_PRIORITY: 50
|
||||
KEEPALIVED_VIRTUAL_IPS: "${VIP:-192.168.1.210}"
|
||||
volumes:
|
||||
- ./keepalived-backup.conf:/etc/keepalived/keepalived.conf:ro
|
||||
command: sh -c "apk add --no-cache keepalived && keepalived -n -l -f /etc/keepalived/keepalived.conf"
|
||||
promtail:
|
||||
image: grafana/promtail:2.9.3
|
||||
container_name: promtail
|
||||
|
||||
@@ -24,15 +24,6 @@ backend mysql_backend
|
||||
mode tcp
|
||||
server mysql1 192.168.1.201:3306 check
|
||||
|
||||
frontend redis_frontend
|
||||
bind *:6379
|
||||
default_backend redis_backend
|
||||
|
||||
backend redis_backend
|
||||
mode tcp
|
||||
server redis1 192.168.1.201:6379 check
|
||||
server redis2 192.168.1.202:6379 check backup
|
||||
|
||||
frontend ftp_control
|
||||
bind *:21
|
||||
default_backend ftp_servers
|
||||
@@ -40,16 +31,16 @@ frontend ftp_control
|
||||
backend ftp_servers
|
||||
mode tcp
|
||||
balance source
|
||||
server ftp1 ftp-server-1:21 check
|
||||
server ftp2 192.168.1.202:21 check
|
||||
server ftp1 192.168.1.201:21 check
|
||||
server ftp2 ftp-server-2:21 check
|
||||
|
||||
frontend ftp_passive
|
||||
bind *:30000-30009
|
||||
bind *:40000-40499
|
||||
mode tcp
|
||||
default_backend ftp_passive_servers
|
||||
|
||||
backend ftp_passive_servers
|
||||
mode tcp
|
||||
balance source
|
||||
server ftp1 ftp-server-1:30000 check
|
||||
server ftp2 192.168.1.202:30000 check
|
||||
server ftp1 192.168.1.201:40000 check port 21
|
||||
server ftp2 ftp-server-2:40000 check port 21
|
||||
|
||||
Reference in New Issue
Block a user