leankg 0.19.34

Lightweight Knowledge Graph for AI-Assisted Development
Documentation
# Local-only docker compose overrides. Copy to `.dockerfile` and edit.
# This file is .gitignored so user-specific host paths never leak.
#
# Usage (single project):
#   cp .dockerfile.example .dockerfile
#   $EDITOR .dockerfile
#   docker compose --env-file .dockerfile up -d
#
# All variables below are optional; compose/Dockerfile set safe defaults.
#
# === Postgres (required — the only storage engine, plan D4) ===
# Connection URL for the leankg service. `docker compose up postgres` starts
# the dev PG (pgvector pg18, host port 5433). Override for a managed instance.
# LEANKG_PG_URL=postgresql://postgres:postgres@localhost:5433/leankg
#
# Postgres pool size (clamped >= 1).
# LEANKG_PG_POOL_SIZE=5
#
# `0` disables the index advisory lock (external job queue).
# LEANKG_PG_LOCK=1

# === Image selection ===
# Hub image tag to pull. Default: freepeak/leankg:latest
# Override to pin a specific version (e.g., 0.19.6) or use a local build.
# LEANKG_IMAGE=freepeak/leankg:latest
#
# Pull policy for Compose: always | missing | never | build
# Default: missing (pull if not present locally). Use 'always' for CI freshness.
# LEANKG_PULL_POLICY=missing

# === Project paths ===

# Absolute path to the LeanKG source tree on the host. Used as the primary
# project mount and the container's working directory.
HOST_PROJECT_PATH=/path/to/your/project

# Container path where HOST_PROJECT_PATH is mounted. Must match the path
# the entrypoint script cd's into before starting the MCP server.
CONTAINER_PROJECT_PATH=/workspace

# Path inside the container that the MCP server should serve by default.
# LEANKG_MCP_PROJECT is read by `leankg mcp-http --project <path>`.
LEANKG_MCP_PROJECT=/workspace

# Paths the entrypoint should scan and auto-index at startup.
# IMPORTANT: this is a COMMA-SEPARATED list. `entrypoint.sh` does
#   IFS=',' read -ra DIRS <<< "$LEANKG_PROJECT_DIRS"
# so each entry must be separated by `,` (spaces are NOT separators).
# Omit or leave blank to let the entrypoint fall back to a /workspace* glob.
LEANKG_PROJECT_DIRS=

# Optional explicit comma-separated list of container paths to index. Most
# setups can leave this unset and rely on the /workspace* glob fallback.
#   LEANKG_PROJECT_DIRS=/workspace,/workspace/other

# Embed (optional overrides — compose/Dockerfile already set safe defaults).
# Local MCP mem_limit is 2g (PRD Local survival).
# LEANKG_EMBED_ON_BOOT=0
# LEANKG_EMBED_BACKGROUND=1
# LEANKG_EMBED_FAST=1
# LEANKG_EMBED_MODEL=bge-q
# LEANKG_EMBED_MAX_SEQ=128
# LEANKG_EMBED_MAX_BLOB_CHARS=500
# LEANKG_EMBED_MAX_MB=512
# LEANKG_EMBED_BACKGROUND_WORKERS=1
# LEANKG_EMBED_BACKGROUND_BATCH=32