-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml.bak
More file actions
41 lines (39 loc) · 862 Bytes
/
Copy pathdocker-compose.yml.bak
File metadata and controls
41 lines (39 loc) · 862 Bytes
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
version: "3.8"
services:
# Development service
app:
build:
context: .
target: development
ports:
- "3000:3000"
volumes:
- ./app:/app
- /app/node_modules # Volume for node_modules to avoid overwrite
environment:
- NODE_ENV=development
- PORT=3000
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
# Production service
app-prod:
build:
context: .
target: production
ports:
- "3001:3000"
environment:
- NODE_ENV=production
- PORT=3000
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s