2026-11-06 13:22:28 +00:00
|
|
|
|
services:
|
|
|
|
|
|
# 1. MetaTrader 5 (Wine + KasmVNC) – startet selbst den RPyC-Server auf 8001
|
2026-11-06 13:56:13 +00:00
|
|
|
|
mt5-gx:
|
2026-11-06 13:22:28 +00:00
|
|
|
|
build: . # eigenes Dockerfile mit Fix
|
2026-11-06 13:56:13 +00:00
|
|
|
|
image: mt5-vnc-gx:local # eigener Name – nicht mit dem Upstream-Image verwechseln
|
|
|
|
|
|
container_name: mt5-gx
|
2026-11-06 13:22:28 +00:00
|
|
|
|
volumes:
|
|
|
|
|
|
- ./config:/config
|
|
|
|
|
|
ports:
|
2026-11-06 13:56:13 +00:00
|
|
|
|
- 3010:3000 # Web-UI
|
2026-11-06 13:22:28 +00:00
|
|
|
|
# 8001 (RPyC) bewusst NICHT veröffentlicht – ungeschützter Vollzugriff auf MT5
|
|
|
|
|
|
env_file:
|
|
|
|
|
|
- .env # CUSTOM_USER / PASSWORD = VNC-Login fürs Web-UI
|
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
healthcheck:
|
|
|
|
|
|
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/8001"]
|
|
|
|
|
|
interval: 30s
|
|
|
|
|
|
timeout: 5s
|
|
|
|
|
|
start_period: 10m # Erststart installiert Wine + MT5
|
|
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
|
|
|
|
# 2. MCP-Server (FastAPI) – spricht per RPyC mit MT5, Broker-Login aus bots.env
|
2026-11-06 13:56:13 +00:00
|
|
|
|
mt5-mcp-gx:
|
2026-11-06 13:22:28 +00:00
|
|
|
|
build: ./bots
|
2026-11-06 13:56:13 +00:00
|
|
|
|
image: mt5-bots-gx:local
|
|
|
|
|
|
container_name: mt5-mcp-gx
|
2026-11-06 13:22:28 +00:00
|
|
|
|
command: ["python", "mcp_server.py", "--live", "--rpyc-host", "mt5", "--rpyc-port", "8001"]
|
|
|
|
|
|
env_file:
|
|
|
|
|
|
- bots.env
|
|
|
|
|
|
ports:
|
2026-11-06 13:56:13 +00:00
|
|
|
|
- 127.0.0.1:8010:8000 # nur lokal – hat Order-Endpunkte ohne Auth
|
2026-11-06 13:22:28 +00:00
|
|
|
|
depends_on:
|
2026-11-06 13:56:13 +00:00
|
|
|
|
mt5-gx:
|
2026-11-06 13:22:28 +00:00
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
healthcheck:
|
|
|
|
|
|
test: ["CMD", "python", "-c",
|
|
|
|
|
|
"import json,urllib.request,sys; d=json.load(urllib.request.urlopen('http://127.0.0.1:8000/health',timeout=5)); sys.exit(0 if d.get('connected') else 1)"]
|
|
|
|
|
|
interval: 30s
|
|
|
|
|
|
timeout: 10s
|
|
|
|
|
|
start_period: 2m
|
|
|
|
|
|
retries: 3
|
|
|
|
|
|
|
|
|
|
|
|
# 3. Telegram Live-Trader – handelt über den MCP-Server
|
2026-11-06 13:56:13 +00:00
|
|
|
|
live-trader-gx:
|
|
|
|
|
|
image: mt5-bots-gx:local
|
|
|
|
|
|
container_name: live-trader-gx
|
2026-11-06 13:22:28 +00:00
|
|
|
|
working_dir: /data # Session + diagnostics_*.json landen im Volume
|
|
|
|
|
|
# Nur Kanal 2 (HM XAUUSD) – CHANNEL2_ID kommt aus bots.env
|
|
|
|
|
|
command: >
|
|
|
|
|
|
python /app/live_signal_trader.py --live
|
|
|
|
|
|
--channels ch1
|
|
|
|
|
|
--risk-tier low
|
|
|
|
|
|
--mt5-base-url http://mt5-mcp:8000
|
|
|
|
|
|
--diagnostics-dir /data
|
|
|
|
|
|
env_file:
|
|
|
|
|
|
- bots.env
|
|
|
|
|
|
environment:
|
|
|
|
|
|
- TG_SESSION=/data/mysession
|
|
|
|
|
|
volumes:
|
|
|
|
|
|
- ./trader-data:/data
|
|
|
|
|
|
depends_on:
|
2026-11-06 13:56:13 +00:00
|
|
|
|
mt5-mcp-gx:
|
2026-11-06 13:22:28 +00:00
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
restart: unless-stopped
|