Files
proxmox-ha-setup/vm1/docker-compose.yml.backup

190 lines
5.0 KiB
Plaintext

services:
mysql:
image: mysql:8.0
container_name: mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-Ase@2025}
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:
- "3306:3306"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD:-Ase@2025}" ]
interval: 10s
timeout: 5s
retries: 3
labels:
logging: "alloy"
logging_jobname: "mysql"
orchestrator-1-load:
build: .
container_name: orchestrator-1-load
restart: unless-stopped
command: [ "python", "-m", "src.load_orchestrator" ]
environment:
DB_HOST: ${VIP:-192.168.1.210}
ORCHESTRATOR_ID: 1
TZ: Europe/Rome
volumes:
- app-logs:/app/logs
- ./env:/app/env:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
- app-network
labels:
logging: "alloy"
orchestrator-2-elab:
build: .
container_name: orchestrator-2-elab
restart: unless-stopped
command: [ "python", "-m", "src.elab_orchestrator" ]
environment:
DB_HOST: ${VIP:-192.168.1.210}
ORCHESTRATOR_ID: 2
TZ: Europe/Rome
volumes:
- app-logs:/app/logs
- ./env:/app/env:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
- app-network
labels:
logging: "alloy"
orchestrator-3-send:
build: .
container_name: orchestrator-3-send
restart: unless-stopped
command: [ "python", "-m", "src.send_orchestrator" ]
environment:
DB_HOST: ${VIP:-192.168.1.210}
ORCHESTRATOR_ID: 3
TZ: Europe/Rome
volumes:
- app-logs:/app/logs
- ./env:/app/env:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
- app-network
labels:
logging: "alloy"
ftp-server-1:
build: .
container_name: ftp-server-1
restart: unless-stopped
command: [ "python", "-m", "src.ftp_csv_receiver" ]
environment:
DB_HOST: ${VIP:-192.168.1.210}
FTP_INSTANCE_ID: 1
FTP_MODE: ftp
TZ: Europe/Rome
FTP_PASSIVE_PORT: "40000"
FTP_EXTERNAL_IP: ${VIP:-192.168.1.210}
# File Processing Behavior
# DELETE_AFTER_PROCESSING: "true" # Cancella file dopo elaborazione corretta (default: false = mantiene i file)
volumes:
- app-logs:/app/logs
- ./aseftp:/app/aseftp
- ./env:/app/env:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
- app-network
ports:
- "40000-40499:40000-40499"
expose:
- "21"
labels:
logging: "alloy"
sftp-server-1:
build: .
container_name: sftp-server-1
restart: unless-stopped
command: [ "python", "-m", "src.ftp_csv_receiver" ]
environment:
DB_HOST: ${VIP:-192.168.1.210}
FTP_INSTANCE_ID: 11
FTP_MODE: sftp
FTP_PORT: "22"
TZ: Europe/Rome
# File Processing Behavior
# DELETE_AFTER_PROCESSING: "true" # Cancella file dopo elaborazione corretta (default: false = mantiene i file)
volumes:
- app-logs:/app/logs
- ./aseftp:/app/aseftp
- ./env:/app/env:ro
- ./ssh_host_key:/app/ssh_host_key:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
- app-network
ports:
- "22:22"
labels:
logging: "alloy"
haproxy:
image: haproxy:2.8-alpine
container_name: haproxy
restart: unless-stopped
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
networks:
- app-network
ports:
- "21:21"
- "8404:8404"
labels:
logging: "alloy"
keepalived:
image: alpine:latest
container_name: keepalived
restart: unless-stopped
cap_add:
- NET_ADMIN
- NET_BROADCAST
- NET_RAW
network_mode: host
volumes:
- ./keepalived-master.conf:/etc/keepalived/keepalived.conf:ro
command: sh -c "apk add --no-cache keepalived && keepalived -n -D -l -f /etc/keepalived/keepalived.conf"
alloy:
image: grafana/alloy:latest
container_name: alloy
restart: unless-stopped
environment:
TZ: Europe/Rome
volumes:
- ./alloy-config.alloy:/etc/alloy/config.alloy:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/host/root:ro
command:
- run
- --server.http.listen-addr=0.0.0.0:12345
- --storage.path=/var/lib/alloy/data
- /etc/alloy/config.alloy
ports:
- "12345:12345" # Alloy UI
networks:
- app-network
networks:
app-network:
volumes:
mysql_data:
app-logs: