-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
49 lines (46 loc) · 1.14 KB
/
docker-compose.yaml
File metadata and controls
49 lines (46 loc) · 1.14 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
name: qcx-stack
services:
qcx:
build:
context: .
dockerfile: Dockerfile
target: runner # Use the production stage
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
- HOSTNAME=0.0.0.0
env_file:
- .env.local # Load environment variables from .env.local if it exists
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Development service (optional - for local development with hot reload)
qcx-dev:
build:
context: .
dockerfile: Dockerfile
target: builder # Use the builder stage for development
command: bun dev
ports:
- "3001:3000"
environment:
- NODE_ENV=development
- PORT=3000
env_file:
- .env.local
volumes:
- .:/app
- node_modules:/app/node_modules
- next_build:/app/.next
restart: unless-stopped
profiles:
- dev # Only start this service when explicitly requested with --profile dev
volumes:
node_modules:
next_build: