-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (43 loc) · 927 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (43 loc) · 927 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
42
43
44
services:
# Development service
dev:
build:
context: .
target: development # Use the development stage from Dockerfile
ports:
- "4321:4321"
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=development
- HOST=0.0.0.0
- PORT=4321
env_file:
- path: .env
required: false
develop:
watch:
- path: ./src
action: sync
target: /app/src
- path: ./public
action: sync
target: /app/public
- path: ./package.json
action: rebuild
# Production service
prod:
build:
context: .
target: production # Use the production stage from Dockerfile
ports:
- "4321:4321"
environment:
- NODE_ENV=production
- HOST=0.0.0.0
- PORT=4321
env_file:
- path: .env
required: false
restart: unless-stopped