kotadb 0.5.0

A custom database for distributed human-AI cognition
Documentation
version: '3.8'

services:
  kotadb-mcp:
    build:
      context: .
      dockerfile: Dockerfile.mcp
    container_name: kotadb-mcp-server
    restart: unless-stopped
    ports:
      - "3000:3000"
    volumes:
      # Data persistence
      - kotadb-mcp-data:/app/data
      # Configuration (can be overridden)
      - ./docker/mcp/kotadb-mcp.toml:/app/config/kotadb-mcp.toml:ro
      # Logs
      - kotadb-mcp-logs:/app/logs
    environment:
      - RUST_LOG=info,kotadb=debug
      - RUST_BACKTRACE=1
      # MCP Server Configuration
      - MCP_SERVER_HOST=0.0.0.0
      - MCP_SERVER_PORT=3000
      - MCP_MAX_CONNECTIONS=100
      - MCP_REQUEST_TIMEOUT=30s
      # Database Configuration
      - KOTADB_DATA_DIR=/app/data
      - KOTADB_MAX_CACHE_SIZE=1000
      - KOTADB_ENABLE_WAL=true
      # Performance Settings
      - KOTADB_WORKER_THREADS=4
      - KOTADB_MAX_BLOCKING_THREADS=16
    healthcheck:
      test: ["CMD", "kotadb-mcp", "--health-check"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
    security_opt:
      - no-new-privileges:true
    read_only: true
    tmpfs:
      - /tmp:noexec,nosuid,size=100m
    user: "1000:1000"
    
  # Optional: Redis for advanced caching
  kotadb-redis:
    image: redis:7.2-alpine
    container_name: kotadb-mcp-redis
    restart: unless-stopped
    ports:
      - "6379:6379"
    volumes:
      - kotadb-redis-data:/data
    command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 3

volumes:
  kotadb-mcp-data:
    driver: local
  kotadb-mcp-logs:
    driver: local
  kotadb-redis-data:
    driver: local

networks:
  default:
    name: kotadb-mcp-network
    driver: bridge