-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
90 lines (85 loc) · 2.07 KB
/
docker-compose.yml
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
version: '3.8'
services:
app:
platform: linux/arm64/v8
build:
context: .
target: development
args:
- NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}
- CLERK_SECRET_KEY=${CLERK_SECRET_KEY}
- DATABASE_URL=${DATABASE_URL}
- CEREBRAS_API_KEY=${CEREBRAS_API_KEY}
- LLAMA_API_KEY=${LLAMA_API_KEY}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- REDIS_URL=redis://redis:6379
ports:
- "3000:3000"
- "9229:9229"
environment:
- NODE_ENV=development
- NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}
- CLERK_SECRET_KEY=${CLERK_SECRET_KEY}
- CEREBRAS_API_KEY=${CEREBRAS_API_KEY}
- LLAMA_API_KEY=${LLAMA_API_KEY}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- REDIS_URL=redis://redis:6379
volumes:
- .:/app
- /app/node_modules
- /app/.next
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
depends_on:
- db
- redis
db:
platform: linux/arm64/v8
image: postgres:16
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=openbooklm
volumes:
- postgres_data:/var/lib/postgresql/data
deploy:
resources:
limits:
memory: 512M
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
platform: linux/arm64/v8
image: redis:7
ports:
- "6379:6379"
volumes:
- redis_data:/data
deploy:
resources:
limits:
memory: 256M
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
redis-insight:
image: redislabs/redisinsight:latest
platform: linux/arm64/v8 # For M1/M2 Macs
ports:
- "8001:8001"
depends_on:
- redis
volumes:
postgres_data:
redis_data: