-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
184 lines (173 loc) · 4.8 KB
/
docker-compose.yml
File metadata and controls
184 lines (173 loc) · 4.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
services:
cognee:
container_name: cognee
restart: always
networks:
- cognee-network
build:
context: .
dockerfile: Dockerfile
volumes:
- ./cognee:/app/cognee
- .env:/app/.env
# Uncomment to allow ingestion of local files from host:
# - /path/to/your/data:/data
environment:
- DEBUG=false # Change to true if debugging
- HOST=0.0.0.0
- ENVIRONMENT=local
- LOG_LEVEL=INFO
# CAUTION: Default '*' allows all origins. Override with specific domains in production.
- CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS:-*}
extra_hosts:
# Allows the container to reach your local machine using "host.docker.internal" instead of "localhost"
- "host.docker.internal:host-gateway"
ports:
- 8000:8000
- 5678:5678 # Debugger port
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
deploy:
resources:
limits:
cpus: "4.0"
memory: 8GB
# Cognee MCP Server - Model Context Protocol server for IDE integration
cognee-mcp:
container_name: cognee-mcp
profiles:
- mcp
networks:
- cognee-network
build:
context: .
dockerfile: cognee-mcp/Dockerfile
command: --no-migration
volumes:
- .env:/app/.env
- ./cognee:/app/cognee
# Uncomment to allow ingestion of local files from host:
# - /path/to/your/data:/data
environment:
- DEBUG=false # Change to true if debugging
- ENVIRONMENT=local
- LOG_LEVEL=INFO
- TRANSPORT_MODE=sse
# Database configuration - should match the main cognee service
- DB_PROVIDER=${DB_PROVIDER:-sqlite}
- DB_HOST=${DB_HOST:-host.docker.internal}
- DB_PORT=${DB_PORT:-5432}
- DB_NAME=${DB_NAME:-cognee_db}
- DB_USERNAME=${DB_USERNAME:-cognee}
- DB_PASSWORD=${DB_PASSWORD:-cognee}
# MCP specific configuration
- MCP_LOG_LEVEL=INFO
- PYTHONUNBUFFERED=1
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "8000:8000" # MCP port
- "5678:5678" # MCP debugger port
deploy:
resources:
limits:
cpus: "2.0"
memory: 4GB
# NOTE: Frontend is a work in progress and supports minimum amount of features required to be functional.
# If you want to use Cognee with a UI environment you can integrate the Cognee MCP Server into Cursor / Claude Desktop / Visual Studio Code (through Cline/Roo)
frontend:
container_name: frontend
restart: always
environment:
- NEXT_PUBLIC_BACKEND_API_URL=${NEXT_PUBLIC_BACKEND_API_URL:-http://localhost:8000}
profiles:
- ui
build:
context: ./cognee-frontend
dockerfile: Dockerfile
volumes:
- ./cognee-frontend/src:/app/src
- ./cognee-frontend/public:/app/public
ports:
- 3000:3000
# - 9229:9229 # Debugging
networks:
- cognee-network
neo4j:
image: neo4j:5.26 # Pinned to 5.x; compatible with neo4j Python driver >=5.28,<6
container_name: neo4j
restart: always
profiles:
- neo4j
ports:
- 7474:7474
- 7687:7687
environment:
- NEO4J_AUTH=neo4j/pleaseletmein
- NEO4J_PLUGINS=["apoc", "graph-data-science"]
networks:
- cognee-network
chromadb:
image: chromadb/chroma:0.6.3
container_name: chromadb
restart: always
profiles:
- chromadb
environment:
- IS_PERSISTENT=TRUE
- CHROMA_SERVER_AUTH_CREDENTIALS=${VECTOR_DB_KEY}
- CHROMA_SERVER_AUTH_CREDENTIALS_PROVIDER=chromadb.auth.token.TokenConfigServerAuthCredentialsProvider
- CHROMA_SERVER_AUTH_TOKEN_TRANSPORT_HEADER=AUTHORIZATION
- CHROMA_SERVER_AUTH_PROVIDER=chromadb.auth.token.TokenAuthServerProvider
volumes:
- .chromadb_data/:/chroma/chroma/
networks:
- cognee-network
ports:
- "3002:8000"
postgres:
image: pgvector/pgvector:pg17
container_name: postgres
restart: always
profiles:
- postgres
environment:
POSTGRES_USER: cognee
POSTGRES_PASSWORD: cognee
POSTGRES_DB: cognee_db
# - postgres_data:/var/lib/postgresql/data
ports:
- 5432:5432
networks:
- cognee-network
redis:
image: redis:7-alpine
container_name: redis
profiles:
- redis
ports:
- "6379:6379"
networks:
- cognee-network
volumes:
- redis_data:/data
command: [ "redis-server", "--appendonly", "yes" ]
redisinsight:
image: redislabs/redisinsight:latest
container_name: redisinsight
restart: always
ports:
- "5540:5540"
networks:
- cognee-network
networks:
cognee-network:
name: cognee-network
volumes:
chromadb_data:
postgres_data:
redis_data: