mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-06 02:37:25 -04:00
refactor: remove batch mode, simplify to API-only deployment
Removes dual-mode deployment complexity, focusing on REST API service only. Changes: - Removed batch mode from docker-compose.yml (now single ai-trader service) - Deleted scripts/test_batch_mode.sh validation script - Renamed entrypoint-api.sh to entrypoint.sh (now default) - Simplified Dockerfile (single entrypoint, removed CMD) - Updated validation scripts to use 'ai-trader' service name - Updated documentation (README.md, TESTING_GUIDE.md, CHANGELOG.md) Benefits: - Eliminates port conflicts between batch and API services - Simpler configuration and deployment - API-first architecture aligned with Windmill integration - Reduced maintenance complexity Breaking Changes: - Batch mode no longer available - All simulations must use REST API endpoints
This commit is contained in:
@@ -1,52 +1,10 @@
|
||||
services:
|
||||
# Batch mode: Run one-time simulations with config file
|
||||
ai-trader-batch:
|
||||
# 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-batch
|
||||
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}
|
||||
|
||||
# System Configuration
|
||||
- RUNTIME_ENV_PATH=/app/data/runtime_env.json
|
||||
|
||||
# MCP Service Ports (fixed internally)
|
||||
- MATH_HTTP_PORT=8000
|
||||
- SEARCH_HTTP_PORT=8001
|
||||
- TRADE_HTTP_PORT=8002
|
||||
- GETPRICE_HTTP_PORT=8003
|
||||
|
||||
# Agent Configuration
|
||||
- AGENT_MAX_STEP=${AGENT_MAX_STEP:-30}
|
||||
ports:
|
||||
# Format: "HOST:CONTAINER" - container ports are fixed, host ports configurable via .env
|
||||
- "${MATH_HTTP_PORT:-8000}:8000"
|
||||
- "${SEARCH_HTTP_PORT:-8001}:8001"
|
||||
- "${TRADE_HTTP_PORT:-8002}:8002"
|
||||
- "${GETPRICE_HTTP_PORT:-8003}:8003"
|
||||
- "${WEB_HTTP_PORT:-8888}:8888"
|
||||
restart: "no" # Batch jobs should not auto-restart
|
||||
profiles:
|
||||
- batch # Only start with: docker-compose --profile batch up
|
||||
|
||||
# API mode: REST API server for Windmill integration
|
||||
ai-trader-api:
|
||||
# image: ghcr.io/xe138/ai-trader:latest
|
||||
# Uncomment to build locally instead of pulling:
|
||||
build: .
|
||||
container_name: ai-trader-api
|
||||
entrypoint: ["./entrypoint-api.sh"]
|
||||
container_name: ai-trader
|
||||
volumes:
|
||||
- ${VOLUME_PATH:-.}/data:/app/data
|
||||
- ${VOLUME_PATH:-.}/logs:/app/logs
|
||||
|
||||
Reference in New Issue
Block a user