Newer
Older
cortex-hub / docker-compose.yml
version: '3.8'

services:
  # Unified Frontend and Nginx Gateway
  ai-frontend:
    build: ./frontend
    container_name: ai_unified_frontend
    restart: always
    ports:
      - "8002:80"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    deploy:
      resources:
        limits:
          cpus: '0.50'
          memory: 512M
    depends_on:
      - ai-hub

  # AI Hub Backend Service
  ai-hub:
    build: ./ai-hub
    container_name: ai_hub_service
    restart: always
    ports:
      - "50051:50051"
    environment:
      - PATH_PREFIX=/api/v1
      - HUB_API_URL=http://localhost:8000
      - HUB_PUBLIC_URL=http://localhost:8002
      - HUB_GRPC_ENDPOINT=localhost:50051
      - OIDC_CLIENT_ID=cortex-server
      - OIDC_CLIENT_SECRET=change-me-at-runtime
      - OIDC_SERVER_URL=http://localhost:8080  # Placeholder for generic setup
      - OIDC_REDIRECT_URI=http://localhost:8002/api/v1/users/login/callback
      - SUPER_ADMINS=admin@example.com
      - SECRET_KEY=default-insecure-key
      - DEBUG_GRPC=true
    volumes:
      - ai_hub_data:/app/data:rw
      - ./agent-node:/app/agent-node-source:ro
      - ./skills:/app/skills:ro
    deploy:
      resources:
        limits:
          cpus: '1.0'
          memory: 1G

# Generic named volume using local driver
volumes:
  ai_hub_data:
    driver: local