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:
2025-10-31 13:54:14 -04:00
parent a9f9560f76
commit 357e561b1f
10 changed files with 75 additions and 495 deletions

View File

@@ -48,9 +48,9 @@
- Job tracking and lifecycle management
- Position records with P&L tracking
- AI reasoning logs and tool usage analytics
- 🐳 **Dual Docker Deployment** - API server mode + Batch mode
- API mode: Persistent REST service with health checks
- Batch mode: One-time simulations (backwards compatible)
- 🐳 **Docker Deployment** - Persistent REST API service
- Health checks and automatic restarts
- Volume persistence for database and logs
- 🧪 **Comprehensive Testing** - 102 tests with 85% coverage
- Unit tests for all components
- Integration tests for API endpoints
@@ -227,9 +227,7 @@ AI-Trader Bench/
### 🐳 **Docker Deployment (Recommended)**
**Two deployment modes available:**
#### 🌐 API Server Mode (Windmill Integration)
#### 🌐 REST API Server (Windmill Integration)
```bash
# 1. Clone and configure
git clone https://github.com/Xe138/AI-Trader.git
@@ -238,7 +236,7 @@ cp .env.example .env
# Edit .env and add your API keys
# 2. Start API server
docker-compose up -d ai-trader-api
docker-compose up -d
# 3. Test API
curl http://localhost:8080/health
@@ -253,16 +251,7 @@ curl -X POST http://localhost:8080/simulate/trigger \
}'
```
See [DOCKER_API.md](DOCKER_API.md) for complete API documentation.
#### 🎯 Batch Mode (One-time Simulation)
```bash
# Run single simulation
docker-compose --profile batch up ai-trader-batch
# With custom config
docker-compose --profile batch run ai-trader-batch configs/custom.json
```
See [DOCKER_API.md](DOCKER_API.md) for complete API documentation and [TESTING_GUIDE.md](TESTING_GUIDE.md) for validation procedures.
---