Integrate Claude Router v1.1.0 as a new service in the main docker-compose stack: Features: - Smart API router with automatic failover between Claude Pro and Claude API - Scheduled health checks every hour (0-4 minutes) to detect quota recovery - Intelligent auto-switch back to Claude Pro when available - Manual health check endpoint for immediate testing - Complete documentation and Docker containerization - Compatible with Claude Code CLI Changes: - Add router/ subdirectory with complete Claude Router project - Integrate claude-router service into main docker-compose.yml - Resolve port conflict (move SillyTavern to 8002, Claude Router uses 8000) - Update .gitignore for router-specific exclusions The router automatically detects when Claude Pro quota is restored and switches back to prioritize the premium service. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
536 B
YAML
25 lines
536 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
claude-router:
|
|
build: .
|
|
container_name: claude-router
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- CLAUDE_API_KEY=${CLAUDE_API_KEY}
|
|
volumes:
|
|
- /home/will/docker/tokens.txt:/home/will/docker/tokens.txt:ro
|
|
restart: unless-stopped
|
|
networks:
|
|
- router-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
networks:
|
|
router-network:
|
|
driver: bridge |