fix ftp ports e external ip per proxy (VIP)
This commit is contained in:
@@ -8,8 +8,11 @@ services:
|
||||
MYSQL_DATABASE: ${MYSQL_DATABASE:-ase_lar}
|
||||
MYSQL_USER: ${MYSQL_USER:-ase_lar}
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-ase_lar}
|
||||
TZ: Europe/Rome
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
networks:
|
||||
- app-network
|
||||
ports:
|
||||
@@ -30,8 +33,11 @@ services:
|
||||
environment:
|
||||
DB_HOST: ${VIP:-192.168.1.210}
|
||||
ORCHESTRATOR_ID: 1
|
||||
TZ: Europe/Rome
|
||||
volumes:
|
||||
- app-logs:/app/logs
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
networks:
|
||||
- app-network
|
||||
labels:
|
||||
@@ -44,8 +50,11 @@ services:
|
||||
environment:
|
||||
DB_HOST: ${VIP:-192.168.1.210}
|
||||
ORCHESTRATOR_ID: 2
|
||||
TZ: Europe/Rome
|
||||
volumes:
|
||||
- app-logs:/app/logs
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
networks:
|
||||
- app-network
|
||||
labels:
|
||||
@@ -58,8 +67,11 @@ services:
|
||||
environment:
|
||||
DB_HOST: ${VIP:-192.168.1.210}
|
||||
ORCHESTRATOR_ID: 3
|
||||
TZ: Europe/Rome
|
||||
volumes:
|
||||
- app-logs:/app/logs
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
networks:
|
||||
- app-network
|
||||
labels:
|
||||
@@ -72,12 +84,40 @@ services:
|
||||
environment:
|
||||
DB_HOST: ${VIP:-192.168.1.210}
|
||||
FTP_INSTANCE_ID: 1
|
||||
TZ: Europe/Rome
|
||||
FTP_PASSIVE_PORT: "40000"
|
||||
FTP_EXTERNAL_IP: ${VIP:-192.168.1.210}
|
||||
volumes:
|
||||
- app-logs:/app/logs
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
networks:
|
||||
- app-network
|
||||
expose:
|
||||
- "21"
|
||||
- "40000-40249"
|
||||
labels:
|
||||
logging: "promtail"
|
||||
ftp-server-1b:
|
||||
build: .
|
||||
container_name: ftp-server-1b
|
||||
restart: unless-stopped
|
||||
command: ["python", "-m", "src.ftp_csv_receiver"]
|
||||
environment:
|
||||
DB_HOST: ${VIP:-192.168.1.210}
|
||||
FTP_INSTANCE_ID: 7
|
||||
TZ: Europe/Rome
|
||||
FTP_PASSIVE_PORT: "40250"
|
||||
FTP_EXTERNAL_IP: ${VIP:-192.168.1.210}
|
||||
volumes:
|
||||
- app-logs:/app/logs
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
networks:
|
||||
- app-network
|
||||
expose:
|
||||
- "21"
|
||||
- "40250-40499"
|
||||
labels:
|
||||
logging: "promtail"
|
||||
haproxy:
|
||||
@@ -90,8 +130,11 @@ services:
|
||||
- app-network
|
||||
ports:
|
||||
- "21:21"
|
||||
- "3306:3306"
|
||||
- "40000-40499:40000-40499"
|
||||
- "8404:8404"
|
||||
labels:
|
||||
logging: "promtail"
|
||||
keepalived:
|
||||
image: alpine:latest
|
||||
container_name: keepalived
|
||||
@@ -108,9 +151,13 @@ services:
|
||||
image: grafana/promtail:2.9.3
|
||||
container_name: promtail
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: Europe/Rome
|
||||
volumes:
|
||||
- ./promtail-config.yml:/etc/promtail/config.yml:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
networks:
|
||||
- app-network
|
||||
networks:
|
||||
|
||||
2
vm1/env/ftp.ini
vendored
2
vm1/env/ftp.ini
vendored
@@ -2,7 +2,7 @@
|
||||
# python3 -c 'from hashlib import sha256;print(sha256("????password???".encode("UTF-8")).hexdigest())'
|
||||
|
||||
[ftpserver]
|
||||
service_port = 2121
|
||||
service_port = 21
|
||||
firstPort = 40000
|
||||
proxyAddr = 0.0.0.0
|
||||
portRangeWidth = 500
|
||||
|
||||
@@ -22,7 +22,7 @@ frontend mysql_frontend
|
||||
|
||||
backend mysql_backend
|
||||
mode tcp
|
||||
server mysql1 192.168.1.201:3306 check
|
||||
server mysql1 mysql:3306 check
|
||||
|
||||
frontend ftp_control
|
||||
bind *:21
|
||||
@@ -30,17 +30,24 @@ frontend ftp_control
|
||||
|
||||
backend ftp_servers
|
||||
mode tcp
|
||||
balance source
|
||||
balance roundrobin
|
||||
server ftp1 ftp-server-1:21 check
|
||||
server ftp2 192.168.1.202:21 check
|
||||
server ftp1b ftp-server-1b:21 check
|
||||
|
||||
frontend ftp_passive
|
||||
bind *:40000-40499
|
||||
frontend ftp_passive_1
|
||||
bind *:40000-40249
|
||||
mode tcp
|
||||
default_backend ftp_passive_servers
|
||||
default_backend ftp_passive_1_backend
|
||||
|
||||
backend ftp_passive_servers
|
||||
backend ftp_passive_1_backend
|
||||
mode tcp
|
||||
balance source
|
||||
server ftp1 ftp-server-1:40000 check port 21
|
||||
server ftp2 192.168.1.202:40000 check port 21
|
||||
|
||||
frontend ftp_passive_1b
|
||||
bind *:40250-40499
|
||||
mode tcp
|
||||
default_backend ftp_passive_1b_backend
|
||||
|
||||
backend ftp_passive_1b_backend
|
||||
mode tcp
|
||||
server ftp1b ftp-server-1b:40250 check port 21
|
||||
|
||||
Reference in New Issue
Block a user