forked from redis/agent-memory-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-task-workers.yml
More file actions
82 lines (77 loc) · 2.26 KB
/
docker-compose-task-workers.yml
File metadata and controls
82 lines (77 loc) · 2.26 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
services:
# For testing a production-like setup, you can run this API and the
# task-worker container. This API container does NOT use --no-worker, so when
# it starts background work, the task-worker will process those tasks.
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- REDIS_URL=redis://redis:6379
- PORT=8000
# Add your API keys here or use a .env file
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
# Optional configurations with defaults
- LONG_TERM_MEMORY=True
- GENERATION_MODEL=gpt-4o-mini
- EMBEDDING_MODEL=text-embedding-3-small
- ENABLE_TOPIC_EXTRACTION=True
- ENABLE_NER=True
depends_on:
- redis
volumes:
- ./agent_memory_server:/app/agent_memory_server
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/v1/health" ]
interval: 30s
timeout: 10s
retries: 3
command: ["agent-memory", "api", "--host", "0.0.0.0", "--port", "8000"]
mcp:
build:
context: .
dockerfile: Dockerfile
environment:
- REDIS_URL=redis://redis:6379
- PORT=9050
# Add your API keys here or use a .env file
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
ports:
- "9050:9000"
depends_on:
- redis
command: ["agent-memory", "mcp", "--mode", "sse"]
task-worker:
build:
context: .
dockerfile: Dockerfile
environment:
- REDIS_URL=redis://redis:6379
# Add your API keys here or use a .env file
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
# Optional configurations with defaults
depends_on:
- redis
command: ["agent-memory", "task-worker"]
volumes:
- ./agent_memory_server:/app/agent_memory_server
restart: unless-stopped
redis:
image: redis:8
ports:
- "16380:6379" # Redis port
volumes:
- redis_data:/data
command: redis-server --save "30 1" --loglevel warning --appendonly no --stop-writes-on-bgsave-error no
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 30s
timeout: 10s
retries: 3
volumes:
redis_data: