services:
ollama:
image: ollama/ollama:latest
volumes:
- ${OLLAMA_MODELS:-ollama-models}:/root/.ollama
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/localhost/11434"]
interval: 5s
timeout: 5s
retries: 10
kodit:
image: ${KODIT_IMAGE:-kodit:test}
depends_on:
ollama:
condition: service_healthy
environment:
- DISABLE_TELEMETRY=true
- "DB_URL=postgresql://postgres:mysecretpassword@vectorchord:5432/kodit"
# Embeddings use the built-in jina-embeddings-v2-base-code model (no external API needed)
- ENRICHMENT_ENDPOINT_BASE_URL=http://ollama:11434/v1
- ENRICHMENT_ENDPOINT_MODEL=qwen2.5:0.5b
- ENRICHMENT_ENDPOINT_API_KEY=ollama
- SKIP_PROVIDER_VALIDATION=true
ports:
- "8080:8080"
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--tries=1",
"--spider",
"http://localhost:8080/healthz",
]
interval: 5s
timeout: 3s
start_period: 10s
retries: 10
# VectorChord PostgreSQL for migration smoke tests.
# Starts with a Python-era database dump loaded via /docker-entrypoint-initdb.d.
vectorchord:
image: tensorchord/vchord-suite:pg17-20250601
environment:
- POSTGRES_DB=kodit
- POSTGRES_PASSWORD=mysecretpassword
command: >
postgres
-c shared_preload_libraries=vchord,vchord_bm25,vector,pg_tokenizer
-c shared_buffers=32MB
-c work_mem=2MB
-c max_connections=50
-c max_worker_processes=2
-c maintenance_work_mem=32MB
-c effective_cache_size=256MB
volumes:
- ./testdata/kodit_dump.sql:/docker-entrypoint-initdb.d/01-dump.sql:ro
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d kodit"]
interval: 3s
timeout: 3s
retries: 10
# Fresh VectorChord for full smoke tests (no pre-loaded data).
vectorchord-clean:
image: tensorchord/vchord-suite:pg17-20250601
environment:
- POSTGRES_DB=kodit
- POSTGRES_PASSWORD=mysecretpassword
command: >
postgres
-c shared_preload_libraries=vchord,vchord_bm25,vector,pg_tokenizer
-c shared_buffers=32MB
-c work_mem=2MB
-c max_connections=50
-c max_worker_processes=2
-c maintenance_work_mem=32MB
-c effective_cache_size=256MB
ports:
- "5434:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d kodit"]
interval: 3s
timeout: 3s
retries: 10
volumes:
ollama-models: