-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
133 lines (129 loc) · 4.85 KB
/
docker-compose.yml
File metadata and controls
133 lines (129 loc) · 4.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# SPDX-FileCopyrightText: 2025 Knitli Inc.
# SPDX-FileContributor: Adam Poulemanos <adam@knit.li>
#
# SPDX-License-Identifier: MIT OR Apache-2.0
# CodeWeaver Docker Compose Configuration
# Provides CodeWeaver MCP server with Qdrant vector database
services:
# Qdrant Vector Database
# Provides persistent vector storage for code embeddings
qdrant:
image: qdrant/qdrant:v1.16.1
container_name: codeweaver-qdrant
ports:
- ${QDRANT_PORT:-6333}:6333 # REST API
- ${QDRANT_GRPC_PORT:-6334}:6334 # gRPC API
volumes:
- qdrant_storage:/qdrant/storage
environment:
- QDRANT__SERVICE__GRPC_PORT=6334
# Note: No internal healthcheck - Qdrant image intentionally excludes curl/wget/nc for security
# Health checking is performed externally by the workflow (see docker.yml lines 189-209)
# See: https://github.com/qdrant/qdrant/issues/3491 and https://github.com/qdrant/qdrant/issues/4250
restart: unless-stopped
networks:
- codeweaver-network
# CodeWeaver MCP Server
# Semantic code search and context delivery for AI agents
codeweaver:
build:
context: .
dockerfile: Dockerfile
container_name: codeweaver-server
# Use HTTP transport for persistent service mode (daemon not needed in Docker)
command:
- codeweaver
- server
- --host
- 0.0.0.0
- --port
- "9328"
- --transport
- streamable-http
ports:
- ${CODEWEAVER_PORT:-9328}:9328
volumes:
# Mount your codebase to be indexed (read-only)
# Changes on host are immediately visible in container
- ${PROJECT_PATH:-.}:/workspace:ro
# Persistent storage for checkpoints, config, and secrets
# CRITICAL: This must persist between restarts for index checkpoints
- codeweaver_config:/app/config
# Application data and cache
- codeweaver_data:/app/data
# Note: Config auto-discovery
# CodeWeaver finds codeweaver.toml in your project root automatically.
# Just add it to PROJECT_PATH - no explicit mount needed.
# For config outside project, mount to: /app/config/codeweaver/codeweaver.toml
environment:
# =================================================================
# Profile-Based Configuration (Recommended)
# =================================================================
# Profile determines providers and models:
# - recommended: Voyage AI (requires VOYAGE_API_KEY)
# - quickstart: FastEmbed/Sentence Transformers (free, local)
# - backup: Lightest local models + in-memory vectors
- CODEWEAVER_PROFILE=${CODEWEAVER_PROFILE:-quickstart}
# Vector store deployment type
- CODEWEAVER_VECTOR_DEPLOYMENT=${VECTOR_DEPLOYMENT:-local}
# For cloud deployment, set CODEWEAVER_VECTOR_URL
# - CODEWEAVER_VECTOR_URL=${VECTOR_URL:-}
# =================================================================
# Core Settings (These work with pydantic_settings)
# =================================================================
- CODEWEAVER_PROJECT_PATH=/workspace
- CODEWEAVER_TOKEN_LIMIT=${TOKEN_LIMIT:-30000}
- CODEWEAVER_PROJECT_NAME=${PROJECT_NAME}
# Redirect user config to mounted volume for checkpoint persistence
- XDG_CONFIG_HOME=/app/config
# =================================================================
# API Keys (Pass through to providers)
# =================================================================
# Required for 'recommended' profile
- VOYAGE_API_KEY=${VOYAGE_API_KEY:-}
# Required for agent functionality (future feature)
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
# Optional: Alternative providers
# - OPENAI_API_KEY=${OPENAI_API_KEY:-}
# - COHERE_API_KEY=${COHERE_API_KEY:-}
# - GOOGLE_API_KEY=${GOOGLE_API_KEY:-}
# =================================================================
# Operational Settings
# =================================================================
depends_on:
# Start after Qdrant starts (workflow performs external health checks)
qdrant:
condition: service_started
healthcheck:
test:
- CMD
- curl
- -sf
- http://localhost:9328/health/
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
networks:
- codeweaver-network
# Resource limits (adjust based on your needs)
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 2G
volumes:
# Persistent storage for Qdrant vector database
qdrant_storage:
driver: local
# CodeWeaver config, checkpoints, and secrets (MUST persist)
codeweaver_config:
driver: local
# CodeWeaver application data
codeweaver_data:
driver: local
networks:
codeweaver-network:
driver: bridge