-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
107 lines (99 loc) · 2.59 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
107 lines (99 loc) · 2.59 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Production stack — run on EC2 after images are pushed to Docker Hub.
#
# Setup:
# cp .env.production.example .env
# # fill in secrets, set DOCKERHUB_USER
# docker compose -f docker-compose.prod.yml pull
# docker compose -f docker-compose.prod.yml up -d
services:
postgres:
image: postgres:16-alpine
container_name: notebot-postgres
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: notebot
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d notebot"]
interval: 10s
timeout: 5s
retries: 5
valkey:
image: valkey/valkey:latest
container_name: notebot-valkey
restart: unless-stopped
volumes:
- valkey_data:/data
command: valkey-server --appendonly yes
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
qdrant:
image: qdrant/qdrant:latest
container_name: notebot-qdrant
restart: unless-stopped
volumes:
- qdrant_data:/qdrant/storage
environment:
QDRANT__SERVICE__GRPC_PORT: 6334
healthcheck:
test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/127.0.0.1/6333'"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
migrate:
image: ${DOCKERHUB_USER}/notebot-lm-worker:${IMAGE_TAG:-latest}
env_file: .env
depends_on:
postgres:
condition: service_healthy
command: npx prisma migrate deploy
restart: "no"
app:
image: ${DOCKERHUB_USER}/notebot-lm-app:${IMAGE_TAG:-latest}
container_name: notebot-app
restart: unless-stopped
env_file: .env
depends_on:
postgres:
condition: service_healthy
valkey:
condition: service_healthy
qdrant:
condition: service_healthy
migrate:
condition: service_completed_successfully
worker:
image: ${DOCKERHUB_USER}/notebot-lm-worker:${IMAGE_TAG:-latest}
container_name: notebot-worker
restart: unless-stopped
env_file: .env
depends_on:
postgres:
condition: service_healthy
valkey:
condition: service_healthy
qdrant:
condition: service_healthy
migrate:
condition: service_completed_successfully
nginx:
image: nginx:alpine
container_name: notebot-nginx
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- app
volumes:
postgres_data:
valkey_data:
qdrant_data: