# Quick Start Production Deployment - Foxhunt HFT **Time Required**: 15-20 minutes (Docker), 30-45 minutes (Bare-Metal) **Prerequisites**: All infrastructure ready (PostgreSQL, Redis, Vault) --- ## 🚀 Docker Deployment (Recommended for Testing/Staging) ### Step 1: Fix Agent 96 Issues (REQUIRED - 5 minutes) ```bash cd /opt/foxhunt # Fix 1: Update Dockerfile paths (all 4 services) find services -name Dockerfile -exec sed -i 's|COPY crates/config|COPY config|g' {} \; # Fix 2: Add ML Training Service entry point echo 'CMD ["ml_training_service", "serve"]' >> services/ml_training_service/Dockerfile # Fix 3: Set Benzinga API key export BENZINGA_API_KEY="your-benzinga-pro-api-key" echo "BENZINGA_API_KEY=$BENZINGA_API_KEY" >> .env ``` ### Step 2: Configure Environment (2 minutes) ```bash # Generate required secrets export JWT_SECRET=$(openssl rand -base64 64 | tr -d '\n') export KILL_SWITCH_TOKEN=$(openssl rand -base64 32) # Create .env file cat > .env < # Docker sudo journalctl -u foxhunt- -n 50 # Bare-metal # Common fix: Restart docker-compose restart sudo systemctl restart foxhunt- ``` ### Issue: Missing Environment Variable ```bash # Docker: Add to .env echo "MISSING_VAR=value" >> .env docker-compose up -d # Bare-metal: Add to SystemD sudo systemctl edit foxhunt- # Add: Environment="MISSING_VAR=value" sudo systemctl restart foxhunt- ``` ### Issue: GPU Not Detected ```bash # Docker: Install nvidia-docker2 sudo apt-get install -y nvidia-docker2 sudo systemctl restart docker # Verify docker run --rm --gpus all nvidia/cuda:12.3.0-base-ubuntu22.04 nvidia-smi ``` ### Issue: Port Already in Use ```bash # Find process sudo lsof -i : # Kill process sudo kill -9 # Restart service docker-compose up -d ``` ### Issue: Database Connection Failed ```bash # Verify PostgreSQL running docker-compose ps postgres # Docker sudo systemctl status postgresql # Bare-metal # Test connection psql $DATABASE_URL -c "SELECT 1;" # Restart database docker-compose restart postgres sudo systemctl restart postgresql ``` --- ## 📊 Monitoring Access - **Grafana**: http://localhost:3000 (admin / foxhunt123) - **Prometheus**: http://localhost:9090 - **Metrics**: - Trading: http://localhost:9092/metrics - Backtesting: http://localhost:9093/metrics - ML Training: http://localhost:9094/metrics - API Gateway: http://localhost:9091/metrics --- ## 📞 Next Steps 1. **Configure monitoring alerts**: Edit `config/prometheus/rules/alerts.yml` 2. **Set up backups**: Configure daily PostgreSQL backups to S3 3. **Enable TLS**: Configure SSL/TLS certificates for production 4. **Review security**: Rotate default passwords and tokens 5. **Load testing**: Run `services/load_tests` to validate performance --- ## 📚 Full Documentation - **Complete Runbook**: `PRODUCTION_DEPLOYMENT_RUNBOOK.md` - **Emergency Procedures**: `EMERGENCY_PROCEDURES.md` - **Maintenance Checklist**: `MAINTENANCE_CHECKLIST.md` - **Architecture**: `CLAUDE.md` --- **Last Updated**: 2025-10-07 **Version**: 1.0.0 **Estimated Time**: 15-20 minutes (Docker), 30-45 minutes (Bare-Metal)