version: '3.8'

services:
  trading-agent:
    build:
      context: .
      dockerfile: Dockerfile.trading
    container_name: alpaca-trading-agent
    restart: always
    volumes:
      - ./:/app/trading
      - /home/node/.openclaw/workspace/memory/trading:/app/state
    environment:
      - PYTHONUNBUFFERED=1
      - TZ=UTC
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

  monitoring-agent:
    build:
      context: .
      dockerfile: Dockerfile.monitoring
    container_name: alpaca-monitoring-agent
    restart: always
    volumes:
      - ./:/app/monitoring
      - /home/node/.openclaw/workspace/memory/trading:/app/state
    environment:
      - PYTHONUNBUFFERED=1
      - TZ=UTC
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"
    depends_on:
      - trading-agent
