-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (63 loc) · 1.69 KB
/
docker-compose.yml
File metadata and controls
65 lines (63 loc) · 1.69 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
services:
qdrant:
image: qdrant/qdrant:latest
container_name: zengram-qdrant
ports:
- "127.0.0.1:6334:6333"
- "127.0.0.1:6335:6334"
volumes:
- ./data/qdrant:/qdrant/storage
environment:
- QDRANT__SERVICE__API_KEY=${QDRANT_API_KEY}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/localhost/6333'"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
memory-api:
build: ./api
container_name: zengram-api
ports:
- "${API_BIND:-127.0.0.1}:8084:8084"
env_file:
- .env
environment:
- HOST=0.0.0.0 # Must be 0.0.0.0 inside container for Docker port mapping
volumes:
- ./data:/app/data
depends_on:
- qdrant
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "node -e \"fetch('http://localhost:8084/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))\""]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# Optional: PostgreSQL for production structured storage
# Enable with: docker-compose --profile postgres up
postgres:
profiles: ["postgres"]
image: postgres:16-alpine
container_name: zengram-postgres
ports:
- "127.0.0.1:5433:5432"
environment:
POSTGRES_DB: zengram
POSTGRES_USER: brain
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-brain_secret}
volumes:
- ./data/postgres:/var/lib/postgresql/data
restart: unless-stopped