File size: 1,998 Bytes
6cd35fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: '3.8'

services:
  # Main trading system
  trading-system:
    build: .
    container_name: algorithmic-trading
    ports:
      - "8000:8000"
    volumes:
      - ./data:/app/data
      - ./logs:/app/logs
      - ./models:/app/models
      - ./config.yaml:/app/config.yaml:ro
    environment:
      - PYTHONPATH=/app
      - LOG_LEVEL=INFO
    command: ["python", "-m", "agentic_ai_system.main", "--mode", "live", "--duration", "300"]
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "python", "-c", "import sys; sys.exit(0)"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

  # FinRL training service
  finrl-training:
    build: .
    container_name: finrl-training
    volumes:
      - ./data:/app/data
      - ./logs:/app/logs
      - ./models:/app/models
      - ./config.yaml:/app/config.yaml:ro
    environment:
      - PYTHONPATH=/app
      - LOG_LEVEL=INFO
    command: ["python", "finrl_demo.py"]
    restart: "no"
    depends_on:
      - trading-system

  # Backtesting service
  backtesting:
    build: .
    container_name: backtesting
    volumes:
      - ./data:/app/data
      - ./logs:/app/logs
      - ./config.yaml:/app/config.yaml:ro
    environment:
      - PYTHONPATH=/app
      - LOG_LEVEL=INFO
    command: ["python", "-m", "agentic_ai_system.main", "--mode", "backtest", "--start-date", "2024-01-01", "--end-date", "2024-12-31"]
    restart: "no"
    depends_on:
      - trading-system

  # Development service with Jupyter
  development:
    build: .
    container_name: trading-dev
    ports:
      - "8888:8888"
    volumes:
      - ./data:/app/data
      - ./logs:/app/logs
      - ./models:/app/models
      - ./config.yaml:/app/config.yaml:ro
      - .:/app
    environment:
      - PYTHONPATH=/app
      - LOG_LEVEL=DEBUG
    command: ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token=''"]
    restart: unless-stopped

volumes:
  data:
  logs:
  models: