Skip to content

Commit 455fa29

Browse files
committed
Fix docker-compose.yml syntax error
Change 'cmd' to 'command' on line 63 for api-for-task-worker service. Also remove --no-worker flag from command since this service is meant to work with a separate task-worker container.
1 parent 7a95c3c commit 455fa29

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

docker-compose.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
services:
2+
# This API service uses --no-worker to run without a worker. When it starts
3+
# background tasks, they run immediately in the API process.
24
api:
35
build:
46
context: .
@@ -28,6 +30,40 @@ services:
2830
retries: 3
2931
# Uses default CMD from Dockerfile (--no-worker for development)
3032

33+
# For testing a production-like setup, you can run this API and the
34+
# task-worker container. This API container does NOT use --no-worker, so when
35+
# it starts background work, the task-worker will process those tasks.
36+
api-for-task-worker:
37+
build:
38+
context: .
39+
dockerfile: Dockerfile
40+
ports:
41+
- "8000:8000"
42+
environment:
43+
- REDIS_URL=redis://redis:6379
44+
- PORT=8000
45+
# Add your API keys here or use a .env file
46+
- OPENAI_API_KEY=${OPENAI_API_KEY}
47+
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
48+
# Optional configurations with defaults
49+
- LONG_TERM_MEMORY=True
50+
- GENERATION_MODEL=gpt-4o-mini
51+
- EMBEDDING_MODEL=text-embedding-3-small
52+
- ENABLE_TOPIC_EXTRACTION=True
53+
- ENABLE_NER=True
54+
depends_on:
55+
- redis
56+
volumes:
57+
- ./agent_memory_server:/app/agent_memory_server
58+
healthcheck:
59+
test: [ "CMD", "curl", "-f", "http://localhost:8000/v1/health" ]
60+
interval: 30s
61+
timeout: 10s
62+
retries: 3
63+
command: ["agent-memory", "api", "--host", "0.0.0.0", "--port", "8000"]
64+
65+
66+
3167
mcp:
3268
build:
3369
context: .
@@ -42,7 +78,7 @@ services:
4278
- "9050:9000"
4379
depends_on:
4480
- redis
45-
command: ["uv", "run", "agent-memory", "mcp", "--mode", "sse"]
81+
command: ["agent-memory", "mcp", "--mode", "sse"]
4682

4783
task-worker:
4884
build:
@@ -56,7 +92,7 @@ services:
5692
# Optional configurations with defaults
5793
depends_on:
5894
- redis
59-
command: ["uv", "run", "agent-memory", "task-worker"]
95+
command: ["agent-memory", "task-worker"]
6096
volumes:
6197
- ./agent_memory_server:/app/agent_memory_server
6298
restart: unless-stopped

0 commit comments

Comments
 (0)