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