-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (94 loc) · 2.59 KB
/
docker-compose.yml
File metadata and controls
97 lines (94 loc) · 2.59 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
# Mem0 local stack
#
# Start:
# docker compose up -d --build
#
# Start with a real OpenAI key:
# cp .env.mem0 .env.mem0.local
# docker compose --env-file .env.mem0.local up -d --build
#
# If .env.mem0 is not provided, the API still starts with a placeholder key.
# Real add/search memory calls require a valid OPENAI_API_KEY.
services:
mem0-postgres:
image: ankane/pgvector:v0.5.1
container_name: mem0-postgres
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "8432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 10s
timeout: 5s
retries: 10
networks:
- mem0_network
mem0-neo4j:
image: neo4j:5.26.4
container_name: mem0-neo4j
restart: unless-stopped
environment:
NEO4J_AUTH: neo4j/mem0graph
NEO4J_PLUGINS: '["apoc"]'
NEO4J_apoc_export_file_enabled: "true"
NEO4J_apoc_import_file_enabled: "true"
NEO4J_apoc_import_file_use__neo4j__config: "true"
ports:
- "8474:7474"
- "8687:7687"
healthcheck:
test: ["CMD-SHELL", "cypher-shell -u neo4j -p mem0graph 'RETURN 1'"]
interval: 10s
timeout: 10s
retries: 20
start_period: 30s
networks:
- mem0_network
mem0-api:
build:
context: ./mem0-api
image: mem0-api-server:local-fixed
container_name: mem0-api
restart: unless-stopped
depends_on:
mem0-postgres:
condition: service_healthy
mem0-neo4j:
condition: service_healthy
environment:
OPENAI_API_KEY: ${OPENAI_API_KEY:-sk-local-placeholder}
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-https://api.openai.com/v1}
OPENAI_LLM_MODEL: ${OPENAI_LLM_MODEL:-gpt-4o}
OPENAI_EMBEDDING_MODEL: ${OPENAI_EMBEDDING_MODEL:-text-embedding-3-small}
POSTGRES_HOST: mem0-postgres
POSTGRES_PORT: "5432"
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_COLLECTION_NAME: memories
NEO4J_URI: bolt://mem0-neo4j:7687
NEO4J_USERNAME: neo4j
NEO4J_PASSWORD: mem0graph
HISTORY_DB_PATH: /app/history/history.db
ports:
- "8000:8000"
healthcheck:
test:
[
"CMD-SHELL",
"python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/docs', timeout=5)\"",
]
interval: 10s
timeout: 10s
retries: 20
start_period: 20s
networks:
- mem0_network
networks:
mem0_network:
name: mem0_network
driver: bridge