forked from mem0ai/mem0
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (76 loc) · 2.35 KB
/
Copy pathdocker-compose.yml
File metadata and controls
78 lines (76 loc) · 2.35 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
services:
mem0:
container_name: mem0
image: registry.cn-shenzhen.aliyuncs.com/tokengo/mem0
build:
context: ./server # Set context to parent directory
dockerfile: Dockerfile
networks:
- mem0_network
ports:
- "8000:8000" # HTTP
volumes:
- ./history:/app/history # History db location. By default, it creates a history.db file on the server folder
depends_on:
postgres:
condition: service_healthy
neo4j:
condition: service_healthy
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload # Enable auto-reload
environment:
- PYTHONDONTWRITEBYTECODE=1 # Prevents Python from writing .pyc files
- PYTHONUNBUFFERED=1 # Ensures Python output is sent straight to terminal
- API_KEY=
- OPENAI_BASE_URL=https://openapi.coreshub.cn/v1
- OPENAI_API_KEY=
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USERNAME=neo4j
- NEO4J_PASSWORD=mem0graph
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_COLLECTION_NAME=mem0Net
- OPENAI_CHAT_MODEL=ernie-4.5-turbo-128k
- OPENAI_EMBEDDING_MODEL=bge-m3
- EMBEDDING_MODEL_DIMS=1024
postgres:
image: pgvector/pgvector:0.8.1-pg18-trixie
restart: on-failure
shm_size: "128mb" # Increase this if vacuuming fails with a "no space left on device" error
networks:
- mem0_network
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "postgres", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 5
neo4j:
image: neo4j:5.26.4
container_name: neo4j
networks:
- mem0_network
healthcheck:
test: wget http://localhost:7687 || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 90s
ports:
- "7474:7474" # HTTP
- "7687:7687" # Bolt
volumes:
- ./neo4j_data:/data
environment:
- NEO4J_AUTH=neo4j/mem0graph
- NEO4J_PLUGINS=["apoc"] # Add this line to install APOC
- NEO4J_apoc_export_file_enabled=true
- NEO4J_apoc_import_file_enabled=true
- NEO4J_apoc_import_file_use__neo4j__config=true
networks:
mem0_network:
driver: bridge