Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (78 loc) · 2.37 KB
/
Copy pathdocker-compose.yml
File metadata and controls
83 lines (78 loc) · 2.37 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
services:
postgres:
image: pgvector/pgvector:pg16
environment:
POSTGRES_DB: corsair
POSTGRES_USER: postgres
POSTGRES_PASSWORD: secret
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
agent:
build:
context: .
dockerfile: Dockerfile.dev
working_dir: /app
volumes:
- .:/app
# Named volume so node_modules can be explicitly cleared on rebuild.
# Anonymous volumes persist across rebuilds and silently shadow new image layers.
- agent_node_modules:/app/node_modules
# corsair.ts is read-only inside the container — only the developer (via Claude Code)
# should edit this file. The agent SDK cannot write to it.
- ./server/corsair.ts:/app/server/corsair.ts:ro
environment:
- DATABASE_URL=postgresql://postgres:secret@postgres:5432/corsair
- DEBUG_CLAUDE_AGENT_SDK=1
# Enable polling so tsx watch detects changes via Docker Desktop's virtiofs share.
- CHOKIDAR_USEPOLLING=true
env_file:
- .env
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
command: sh -c "pnpm db:push && pnpm exec tsx watch server/index.ts"
ui:
build:
context: .
dockerfile: Dockerfile.ui.dev
working_dir: /app/ui
volumes:
- .:/app
# Named volume so node_modules can be explicitly cleared on rebuild.
- ui_node_modules:/app/ui/node_modules
environment:
# Used server-side by Next.js rewrites to proxy /trpc to the agent.
- BACKEND_URL=http://agent:3000
# Enable webpack polling for file watching via Docker Desktop's virtiofs share.
- WATCHPACK_POLLING=true
ports:
- "3001:3000"
depends_on:
- agent
command: pnpm dev
# Exposes the agent server to the internet via an ngrok tunnel.
# Set NGROK_AUTHTOKEN in .env (required). Set NGROK_DOMAIN for a stable URL.
# The public URL is available at http://localhost:4040 after startup.
ngrok:
image: ngrok/ngrok:latest
command: http agent:3000
environment:
- NGROK_AUTHTOKEN=${NGROK_AUTHTOKEN}
depends_on:
- agent
restart: unless-stopped
ports:
- "4040:4040"
volumes:
pgdata:
agent_node_modules:
ui_node_modules: