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

173 lines
4.6 KiB
YAML

services:
orchestrator-1-load:
image: 192.168.1.204:5000/orchestrator-app:latest
container_name: orchestrator-1-load
restart: unless-stopped
command: ["./load_orchestrator"]
environment:
APP_ENV_PATH: /app
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:
image: 192.168.1.204:5000/orchestrator-app:latest
container_name: orchestrator-2-elab
restart: unless-stopped
command: ["./elab_orchestrator"]
environment:
APP_ENV_PATH: /app
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:
image: 192.168.1.204:5000/orchestrator-app:latest
container_name: orchestrator-3-send
restart: unless-stopped
command: ["./send_orchestrator"]
environment:
APP_ENV_PATH: /app
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:
image: 192.168.1.204:5000/orchestrator-app:latest
container_name: ftp-server-1
restart: unless-stopped
command: ["./ftp_csv_receiver"]
environment:
APP_ENV_PATH: /app
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:
image: 192.168.1.204:5000/orchestrator-app:latest
container_name: sftp-server-1
restart: unless-stopped
command: ["./ftp_csv_receiver"]
environment:
APP_ENV_PATH: /app
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-vm1
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-vm1
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"
labels:
logging: "alloy"
alloy:
image: grafana/alloy:latest
container_name: alloy
restart: unless-stopped
environment:
TZ: Europe/Rome
HOSTNAME: vm1
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
labels:
hostname: "vm1"
networks:
app-network:
volumes:
app-logs: