Deployment

Kodit is packaged as a Docker container so you can run it on any popular orchestration platform. This page describes how to deploy Kodit as a service.

Deploying With Docker Compose

Create a docker-compose file that specifies Kodit and Vectorchord containers. Replace the latest tag with a version. Replace any API keys with your own or configure internal endpoints.

Then run Kodit with docker compose -f docker-compose.yaml up -d. For more instructions see the Docker Compose documentation.

Here is an example:

version: "3.9"

services:
  kodit:
    image: registry.helix.ml/helix/kodit:latest # Replace with a version
    ports:
      - "8080:8080" # Expose the MCP server
    # Start the Kodit MCP server and bind to all interfaces
    command: ["serve", "--host", "0.0.0.0", "--port", "8080"]
    restart: unless-stopped
    depends_on:
      - vectorchord # Wait for VectorChord to start before Kodit
    
    # Configure Kodit
    environment:
      # Configure the database
      DB_URL: postgresql+asyncpg://postgres:mysecretpassword@vectorchord:5432/kodit
      DEFAULT_SEARCH_PROVIDER: vectorchord

      # External embedding provider
      EMBEDDING_ENDPOINT_TYPE: openai
      EMBEDDING_ENDPOINT_BASE_URL: https://api.openai.com/v1
      EMBEDDING_ENDPOINT_API_KEY: REPLACE_WITH_YOUR_API_KEY
      EMBEDDING_ENDPOINT_MODEL: text-embedding-3-large

      # External enrichment provider
      ENRICHMENT_ENDPOINT_TYPE: openai
      ENRICHMENT_ENDPOINT_BASE_URL: https://api.openai.com/v1
      ENRICHMENT_ENDPOINT_API_KEY: REPLACE_WITH_YOUR_API_KEY
      ENRICHMENT_ENDPOINT_MODEL: o3-mini


  vectorchord:
    image: tensorchord/vchord-suite:pg17-20250601
    environment:
      - POSTGRES_DB=kodit
      - POSTGRES_PASSWORD=mysecretpassword
    ports:
      - "5432:5432"
    restart: unless-stopped

Deploying With Kubernetes

To deploy with Kubernetes we recommend using a templating solution like Helm or Kustomize.

Here is a simple raw Kubernetes manifest to help get you started. Remember to pin the Kodit container at a specific version and update the required API keys.

Deploy with kubectl -n kodit apply -f kubernetes.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: vectorchord
  labels:
    app: vectorchord
spec:
  replicas: 1
  selector:
    matchLabels:
      app: vectorchord
  template:
    metadata:
      labels:
        app: vectorchord
    spec:
      containers:
        - name: vectorchord
          image: tensorchord/vchord-suite:pg17-20250601
          env:
            - name: POSTGRES_DB
              value: "kodit"
            - name: POSTGRES_PASSWORD
              value: "mysecretpassword"
          ports:
            - containerPort: 5432
---
apiVersion: v1
kind: Service
metadata:
  name: vectorchord
spec:
  selector:
    app: vectorchord
  ports:
    - port: 5432
      targetPort: 5432
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kodit
  labels:
    app: kodit
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kodit
  template:
    metadata:
      labels:
        app: kodit
    spec:
      containers:
        - name: kodit
          image: registry.helix.ml/helix/kodit:latest # Replace with a version
          args: ["serve", "--host", "0.0.0.0", "--port", "8080"]
          env:
            - name: DB_URL
              value: "postgresql+asyncpg://postgres:mysecretpassword@vectorchord:5432/kodit"
            - name: DEFAULT_SEARCH_PROVIDER
              value: "vectorchord"
            - name: EMBEDDING_ENDPOINT_TYPE
              value: "openai"
            - name: EMBEDDING_ENDPOINT_BASE_URL
              value: "https://api.openai.com/v1"
            - name: EMBEDDING_ENDPOINT_API_KEY
              value: "REPLACE_WITH_YOUR_API_KEY"
            - name: EMBEDDING_ENDPOINT_MODEL
              value: "text-embedding-3-large"
            - name: ENRICHMENT_ENDPOINT_TYPE
              value: "openai"
            - name: ENRICHMENT_ENDPOINT_BASE_URL
              value: "https://api.openai.com/v1"
            - name: ENRICHMENT_ENDPOINT_API_KEY
              value: "REPLACE_WITH_YOUR_API_KEY"
            - name: ENRICHMENT_ENDPOINT_MODEL
              value: "o3-mini"
          ports:
            - containerPort: 8080
          readinessProbe:
            httpGet:
              path: /
              port: 8080
            initialDelaySeconds: 10
            periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
  name: kodit
spec:
  type: LoadBalancer
  selector:
    app: kodit
  ports:
    - port: 8080
      targetPort: 8080

Deploying With a Kind Kubernetes Cluster

Kind is a k8s cluster that runs in a Docker container. So it’s great for k8s development.

  1. kind create cluster
  2. kubectl -n kodit apply -f kubernetes.yaml