mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-01 17:17:24 -04:00
Simplifies deployment configuration by removing the RUNTIME_ENV_PATH
environment variable, which is no longer needed for API mode.
Changes:
- Remove RUNTIME_ENV_PATH from docker-compose.yml
- Remove RUNTIME_ENV_PATH from .env.example
- Update CLAUDE.md to reflect API-managed runtime configs
- Update README.md to remove RUNTIME_ENV_PATH from config examples
- Update CHANGELOG.md with this simplification
Technical details:
- API mode dynamically creates isolated runtime config files via
RuntimeConfigManager (data/runtime_env_{job_id}_{model}_{date}.json)
- tools/general_tools.py already handles missing RUNTIME_ENV_PATH
gracefully, returning empty dict and warning on writes
- No functional impact - all tests pass without this variable set
- Reduces configuration complexity for new deployments
Breaking change: None - variable was vestigial from batch mode era
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
services:
|
|
# REST API server for Windmill integration
|
|
ai-trader:
|
|
# image: ghcr.io/xe138/ai-trader:latest
|
|
# Uncomment to build locally instead of pulling:
|
|
build: .
|
|
container_name: ai-trader
|
|
volumes:
|
|
- ${VOLUME_PATH:-.}/data:/app/data
|
|
- ${VOLUME_PATH:-.}/logs:/app/logs
|
|
- ${VOLUME_PATH:-.}/configs:/app/configs
|
|
environment:
|
|
# AI Model API Configuration
|
|
- OPENAI_API_BASE=${OPENAI_API_BASE}
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
|
|
# Data Source Configuration
|
|
- ALPHAADVANTAGE_API_KEY=${ALPHAADVANTAGE_API_KEY}
|
|
- JINA_API_KEY=${JINA_API_KEY}
|
|
|
|
# MCP Service Ports (fixed internally)
|
|
- MATH_HTTP_PORT=8000
|
|
- SEARCH_HTTP_PORT=8001
|
|
- TRADE_HTTP_PORT=8002
|
|
- GETPRICE_HTTP_PORT=8003
|
|
|
|
# API Configuration
|
|
- API_PORT=${API_PORT:-8080}
|
|
|
|
# Agent Configuration
|
|
- AGENT_MAX_STEP=${AGENT_MAX_STEP:-30}
|
|
ports:
|
|
# MCP service ports (internal)
|
|
- "${MATH_HTTP_PORT:-8000}:8000"
|
|
- "${SEARCH_HTTP_PORT:-8001}:8001"
|
|
- "${TRADE_HTTP_PORT:-8002}:8002"
|
|
- "${GETPRICE_HTTP_PORT:-8003}:8003"
|
|
# API server port (primary interface)
|
|
- "${API_PORT:-8080}:8080"
|
|
# Web dashboard
|
|
- "${WEB_HTTP_PORT:-8888}:8888"
|
|
restart: unless-stopped # Keep API server running
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|