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

services:
  # The backend service for your AI Hub
  ai-hub:
    build: ./ai-hub
    container_name: ai_hub_service
    restart: unless-stopped
    environment:
      - PATH_PREFIX=/api/v1
      - OIDC_CLIENT_ID=cortex-server
      - OIDC_CLIENT_SECRET=aYc2j1lYUUZXkBFFUndnleZI
      - OIDC_SERVER_URL=https://auth.jerxie.com
      - OIDC_REDIRECT_URI=https://ai.jerxie.com/api/v1/users/login/callback
    volumes:
      # Mount the named volume to the /app/data directory in the container
      - ai_hub_data:/app/data:rw
    ports:
      # Expose the AI Hub's port
      - "8002:8000"

  # The frontend service for your React application, served by Nginx
  ai-ui:
    # Use a build context to find the React app's Dockerfile
    # This assumes your React project is in a subdirectory named 'react-app'
    build: ./ui/client-app
    container_name: ai_frontend_service
    restart: unless-stopped

    environment:
      - REACT_APP_API_BASE_URL=https://ai.jerxie.com/api/v1
      - PORT=8000
    ports:
      # Map host port 8003 to container port 8000
      - "8003:8000"

# Define the named volume for the AI hub's data
volumes:
  ai_hub_data:
    driver: local
    driver_opts:
      type: "nfs"
      # IMPORTANT: Replace the IP address below with your NFS server's actual IP
      o: "addr=192.168.68.90,rw"
      # IMPORTANT: Replace this path with the correct directory on your NFS server
      device: ":/volume1/docker/ai-hub/data"