-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
142 lines (136 loc) · 3.8 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
142 lines (136 loc) · 3.8 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
134
135
136
137
138
139
140
141
services:
qdrant:
container_name: qdrant
image: qdrant/qdrant:v1.18.0
restart: unless-stopped
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant_data:/qdrant/storage
environment:
- QDRANT__LOG_LEVEL=INFO
- QDRANT__SERVICE__HTTP_PORT=6333
- QDRANT__SERVICE__GRPC_PORT=6334
healthcheck:
test: bash -c ':> /dev/tcp/localhost/6333'
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
networks:
- qdrant-net
# ------------------------------------------------------------------------------
# IMPORTANT
# SQLite is intended for local CLI usage only.
# Container deployments should not rely on SQLite state (will implement in the future release).
# ------------------------------------------------------------------------------
qdrant-loader:
container_name: qdrant-loader
build:
context: .
dockerfile: Dockerfile.qdrant-loader
image: qdrant-loader:latest
restart: unless-stopped
ports:
- 8081:8081
# Ensure .env and config.yaml exist on the host
volumes:
- ./.env:/qdrant-loader/.env
- ./config.yaml:/qdrant-loader/config.yaml
depends_on:
qdrant:
condition: service_healthy
networks:
- qdrant-net
# ------------------------------------------------------------------------------
# NOTE
# This MCP server is stateless:
# - No SQL database
# - No background job state
#
# Persistent storage is not required.
# ------------------------------------------------------------------------------
qdrant-loader-mcp-server:
container_name: qdrant-loader-mcp-server
build:
context: .
dockerfile: Dockerfile.qdrant-loader-mcp-server
image: qdrant-loader-mcp-server:latest
restart: unless-stopped
ports:
- "8080:8080"
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- QDRANT_URL=${QDRANT_URL:-http://qdrant:6333}
- QDRANT_COLLECTION_NAME=${QDRANT_COLLECTION_NAME}
- LLM_PROVIDER=${LLM_PROVIDER}
- LLM_BASE_URL=${LLM_BASE_URL}
- LLM_API_KEY=${LLM_API_KEY}
- LLM_EMBEDDING_MODEL=${LLM_EMBEDDING_MODEL}
- LLM_CHAT_MODEL=${LLM_CHAT_MODEL}
- MCP_LOG_LEVEL=${MCP_LOG_LEVEL:-INFO}
- MCP_LOG_FILE=${MCP_LOG_FILE:-mcp.log}
- MCP_DISABLE_CONSOLE_LOGGING=${MCP_DISABLE_CONSOLE_LOGGING:-false}
depends_on:
qdrant:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8080/health')"
]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks:
- qdrant-net
# ==============================================================================
# OLLAMA SETUP
# ==============================================================================
#
# Required only when LLM_PROVIDER=ollama.
#
# Startup order:
# 1. ollama
# 2. ollama pull <model_name>
# 3. qdrant-loader / qdrant-loader-mcp-server
#
# Example:
# docker exec -it ollama bash
# ollama pull llama3.2
#
# ==============================================================================
# ollama:
# image: ollama/ollama:latest
# ports:
# - 11434:11434
# volumes:
# - ollama:/root/.ollama
# container_name: ollama
# tty: true
# restart: always
# environment:
# - OLLAMA_KEEP_ALIVE=24h
# - OLLAMA_HOST=0.0.0.0
# command: ["serve"]
# networks:
# - qdrant-net
# healthcheck:
# test: ["CMD", "ollama", "ps"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 40s
volumes:
qdrant_data:
driver: local
# ollama:
# driver: local
networks:
qdrant-net:
driver: bridge