-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (67 loc) · 2.31 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (67 loc) · 2.31 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
services:
mongo:
image: mongo:7
# WiredTiger defaults its cache to ~50% of host RAM regardless of how many
# mongods share the box; cap it so seven of them cannot swap the 8 GB host.
command: ["mongod", "--wiredTigerCacheSizeGB", "0.5"]
mem_limit: 1g
restart: unless-stopped
volumes:
- mongo-data:/data/db
healthcheck:
# Pure-bash TCP connect — mongosh spawns a whole Node.js runtime per
# check, which is far too heavy for a 10s-interval health probe.
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/27017"]
interval: 10s
timeout: 5s
retries: 5
chroma:
image: chromadb/chroma:0.5.20
restart: unless-stopped
# Host-side default 8599 to avoid colliding with anything else on 8000.
# Inside the container Chroma always listens on 8000.
ports:
- "${CHROMA_PORT:-8599}:8000"
volumes:
- chroma-data:/chroma/chroma
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8000/api/v1/heartbeat"]
interval: 10s
timeout: 5s
retries: 5
bot:
# Deps-only image (node_modules + tools); app source is bind-mounted below,
# so code changes are rsync + restart with no image rebuild.
build:
context: .
restart: unless-stopped
depends_on:
mongo:
condition: service_healthy
chroma:
condition: service_healthy
env_file: .env
environment:
MONGO_URI: mongodb://mongo:27017
CHROMA_URL: http://chroma:8000
BACKUP_DIR: /data/backups
ports:
- "${WEB_PORT:-3000}:${WEB_PORT:-3000}"
- "${HOCUSPOCUS_PORT:-3001}:${HOCUSPOCUS_PORT:-3001}"
# MCP server for coding agents (src/mcp/) — no auth, so this machine only.
- "127.0.0.1:${MCP_PORT:-3002}:${MCP_PORT:-3002}"
volumes:
# App source — mounted, not baked into the image. `web/dist` is built on
# the host by deploy.sh. node_modules stays in the image (we mount the
# individual source dirs, never /app, so the image's deps aren't shadowed).
- ./src:/app/src
- ./scripts:/app/scripts
- ./data:/app/data
- ./web/dist:/app/web/dist
- exports:/data/exports
- ./backups:/data/backups
- ${GOOGLE_APPLICATION_CREDENTIALS_HOST_PATH:-/dev/null}:/secrets/alexa2.json:ro
volumes:
mongo-data:
chroma-data:
exports: