-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
92 lines (87 loc) · 2.3 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
92 lines (87 loc) · 2.3 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
name: qcx-stack
services:
db:
build:
context: .
dockerfile: Dockerfile.db
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-qcxuser}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-qcxpassword}
POSTGRES_DB: ${POSTGRES_DB:-qcxdb}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-qcxuser} -d ${POSTGRES_DB:-qcxdb}"]
interval: 10s
timeout: 5s
retries: 5
qdrant:
image: qdrant/qdrant:latest
restart: unless-stopped
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant_data:/qdrant/storage
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6333/health"]
interval: 10s
timeout: 5s
retries: 5
qcx:
build:
context: .
dockerfile: Dockerfile
target: runner
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
- HOSTNAME=0.0.0.0
- DATABASE_URL=postgres://${POSTGRES_USER:-qcxuser}:${POSTGRES_PASSWORD:-qcxpassword}@db:5432/${POSTGRES_DB:-qcxdb}
- QDRANT_URL=http://qdrant:6333
- EXECUTE_MIGRATIONS=true
# Add other necessary env vars here or use an .env file
depends_on:
db:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "bun", "--eval", "fetch('http://localhost:3000/api/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Development service
qcx-dev:
build:
context: .
dockerfile: Dockerfile
target: builder
command: bun dev
ports:
- "3001:3000"
environment:
- NODE_ENV=development
- PORT=3000
- DATABASE_URL=postgres://${POSTGRES_USER:-qcxuser}:${POSTGRES_PASSWORD:-qcxpassword}@db:5432/${POSTGRES_DB:-qcxdb}
- QDRANT_URL=http://qdrant:6333
depends_on:
db:
condition: service_healthy
qdrant:
condition: service_started
volumes:
- .:/app
- node_modules:/app/node_modules
- next_build:/app/.next
restart: unless-stopped
profiles:
- dev
volumes:
postgres_data:
qdrant_data:
node_modules:
next_build: