Files
AI-Trader/docs/deployment/docker-deployment.md
Bill 41a369a15e docs: update deployment docs for AI-Trader-Server rebrand
Update deployment documentation files:
- docker-deployment.md: Update git clone URL, Docker image references
  (ghcr.io/xe138/ai-trader to ghcr.io/xe138/ai-trader-server), and
  container/service names (ai-trader to ai-trader-server)
- monitoring.md: Update container names in all docker commands
- scaling.md: Update multi-instance service names and Docker image
  references

All deployment examples now use ai-trader-server naming.

Part of Phase 3: Developer & Deployment Documentation
2025-11-01 11:58:04 -04:00

96 lines
1.5 KiB
Markdown

# Docker Deployment
Production Docker deployment guide.
---
## Quick Deployment
```bash
git clone https://github.com/Xe138/AI-Trader-Server.git
cd AI-Trader-Server
cp .env.example .env
# Edit .env with API keys
docker-compose up -d
```
---
## Production Configuration
### Use Pre-built Image
```yaml
# docker-compose.yml
services:
ai-trader-server:
image: ghcr.io/xe138/ai-trader-server:latest
# ... rest of config
```
### Build Locally
```yaml
# docker-compose.yml
services:
ai-trader-server:
build: .
# ... rest of config
```
---
## Volume Persistence
Ensure data persists across restarts:
```yaml
volumes:
- ./data:/app/data # Required: database and cache
- ./logs:/app/logs # Recommended: application logs
- ./configs:/app/configs # Required: model configurations
```
---
## Environment Security
- Never commit `.env` to version control
- Use secrets management (Docker secrets, Kubernetes secrets)
- Rotate API keys regularly
- Restrict network access to API port
---
## Health Checks
Docker automatically restarts unhealthy containers:
```yaml
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
```
---
## Monitoring
```bash
# Container status
docker ps
# Resource usage
docker stats ai-trader-server
# Logs
docker logs -f ai-trader-server
```
---
See [DOCKER_API.md](../../DOCKER_API.md) for detailed Docker documentation.