-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (43 loc) · 1.12 KB
/
docker-compose.yml
File metadata and controls
45 lines (43 loc) · 1.12 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
services:
api:
build:
context: .
target: api
# ports:
# - "3001:3001" # uncomment for direct API access (debugging)
volumes:
- ./books:/app/books
# Uncomment to override baked-in defaults (requires files on host):
# - ./prompts:/app/prompts
# - ./templates:/app/templates:ro
# - ./config.yaml:/app/config.yaml:ro
environment:
- PROJECT_ROOT=/app
- BOOKS_DIR=/app/books
- PROMPTS_DIR=/app/prompts
- TEMPLATES_DIR=/app/templates
- CONFIG_PATH=/app/config.yaml
networks:
- internal
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:3001/api/health').then(r => { if (!r.ok) process.exit(1); else process.exit(0); }).catch(() => process.exit(1))"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
restart: unless-stopped
studio:
build:
context: .
target: studio
ports:
- "${PORT:-8080}:80"
networks:
- internal
depends_on:
api:
condition: service_healthy
restart: unless-stopped
networks:
internal:
driver: bridge