-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (102 loc) · 2.79 KB
/
docker-compose.yml
File metadata and controls
106 lines (102 loc) · 2.79 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
services:
cp-agent-setup:
build:
context: ./cp-agent
dockerfile: Dockerfile.dev
args:
ENV_FILE: .env.development
ENV: development
KB_CHROMA_DIRECTORY: /app/kb_db
KB_CHROMA_CLIENT_TYPE: persistent
volumes:
- ./cp-agent/cp_agent:/app/cp_agent:ro
- agent-kb-data:/app/kb_db
environment:
- LOGURU_LEVEL=DEBUG
- TRANSFORMERS_VERBOSITY=info
- PYTHONUNBUFFERED=1
- TOKENIZERS_PARALLELISM=true
command: >
sh -c "poetry install --no-root &&
poetry run kb-cli nuke --force &&
poetry run kb-cli ingest /app/cp_agent/kb/data"
cp-agent:
build:
context: ./cp-agent
dockerfile: Dockerfile.dev
args:
ENV_FILE: .env.development
ENV: development
# Pass build args to modify .env.development content
KB_CHROMA_DIRECTORY: /app/kb_db
KB_CHROMA_CLIENT_TYPE: persistent
WORKSPACE_PATH: /app/workspace
ports:
- '8000:8000'
volumes:
- ./cp-agent/cp_agent:/app/cp_agent:ro
- agent-kb-data:/app/kb_db
- workspace-data:/app/workspace
environment:
- PORT=8000
- ENV=development
- KB_CHROMA_CLIENT_TYPE=persistent
- KB_CHROMA_DIRECTORY=/app/kb_db
- WORKSPACE_PATH=/app/workspace
- RUNNER_BASE_URL=http://cp-runner:8088
restart: unless-stopped
depends_on:
cp-runner:
condition: service_started
cp-agent-setup:
condition: service_completed_successfully
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8000/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
cp-runner:
build:
context: ./cp-runner
dockerfile: Dockerfile.dev
args:
ENV_FILE: .env.development
ENV: development
# Pass build args to modify .env.development content
WORKSPACE_PATH: /app/workspace
ports:
- '8088:8088' # Control port
- '3035:3035' # Proxy port
environment:
- ENV=development
- CONTROL_PORT=8088
- PROXY_PORT=3035
- WORKSPACE_PATH=/app/workspace
volumes:
- workspace-data:/app/workspace
restart: unless-stopped
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8088/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
cp-webapp:
build:
context: ./cp-webapp
dockerfile: Dockerfile.dev
args:
ENV_FILE: .env.development
ENV: development
ports:
- '3000:3000'
environment:
- ENV=development
restart: unless-stopped
depends_on:
- cp-agent
- cp-runner
volumes:
agent-kb-data: # Persistent storage for the knowledge base
workspace-data: # Shared workspace for projects between agent and runner