Docker Compose Deployment

Set up a multi-container development environment with Docker Compose, including the AI Engine, databases, and monitoring stack.

Prerequisites

  • Docker 20.10+ installed
  • Docker Compose 2.0+ installed
  • 4 GB RAM available for containers

Build Docker Images

Build all required container images:

# Build xDS Server
docker build -f docker/xds-server/Dockerfile -t qbitel/xds-server:latest .

# Build Admission Webhook
docker build -f docker/admission-webhook/Dockerfile -t qbitel/admission-webhook:latest .

Start Services

# Navigate to Docker configuration
cd ai_engine/deployment/docker

# Start all services in detached mode
docker-compose up -d

# View real-time logs
docker-compose logs -f qbitel-engine

# Check service status
docker-compose ps

Included Services

Service Port Description
qbitel-engine 8000, 50051, 9090 AI Engine REST + gRPC + metrics
mlflow 5000 Model registry and experiment tracking
prometheus 9091 Metrics collection and alerting
grafana 3000 Dashboards and visualization
postgres 5432 Database for MLflow and application data
redis 6379 Caching and rate limiting
nginx 80, 443 Reverse proxy and TLS termination

Access Services

Once services are running, access them at:

  • AI Engine API: http://localhost:8000
  • API Documentation: http://localhost:8000/docs
  • Grafana: http://localhost:3000 (admin / qbitel-admin)
  • Prometheus: http://localhost:9091
  • MLflow: http://localhost:5000

Custom Configuration

Override default settings by creating a .env file alongside docker-compose.yml:

# .env
QBITEL_LOG_LEVEL=DEBUG
QBITEL_DEVICE=cpu
QBITEL_LLM_PROVIDER=ollama
OLLAMA_URL=http://host.docker.internal:11434
DATABASE_URL=postgresql://qbitel:password@postgres:5432/qbitel

Stop and Clean Up

# Stop all services
docker-compose down

# Stop and remove volumes (full reset)
docker-compose down -v

Next Steps