-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
42 lines (42 loc) · 918 Bytes
/
docker-compose.yml
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
version: "3"
services:
api:
build:
context: ./api
dockerfile: Dockerfile
command: npm run start-watch
volumes:
- ./api:/usr/app/
- ./api/node_modules:/usr/app/node_modules
ports:
- "3000:3000"
- "9229:9229"
depends_on:
- mongo
environment:
NODE_ENV: development
MONGO_URL: mongodb://mongo:27017/${MONGO_INITDB_DATABASE}
MONGO_USER: ${MONGO_USERNAME}
MONGO_PWD: ${MONGO_PASSWORD}
IS_LOCAL: ${IS_LOCAL}
mongo:
image: mongo
restart: always
volumes:
- ./data/mongo:/data/db
ports:
- "27017:27017"
webapp:
build:
context: ./webapp
dockerfile: Dockerfile
command: npm run start
volumes:
- ./webapp:/usr/app/
- ./webapp/node_modules:/usr/app/node_modules
ports:
- "8080:8080"
depends_on:
- api
environment:
NODE_ENV: development