-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.dev.yml
executable file
·58 lines (51 loc) · 1.1 KB
/
docker-compose.dev.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: "3.7"
services:
spa:
image: node:latest
ports:
- "${SPA_PORT}:3000"
volumes:
- "${PROJECT_LOCATION}:/usr/app"
working_dir: /usr/app
command: npm start
networks:
map:
aliases:
- spa
api:
image: node:latest
ports:
- "${API_PORT}:8000"
volumes:
- "${PROJECT_LOCATION}:/usr/app"
working_dir: /usr/app
command: bash -c "npm install && ./node_modules/.bin/nodemon --legacy-watch --exec 'node -r dotenv/config' api/server.js dotenv_config_path=${DOTENV_CONFIG_PATH_FOR_API}"
networks:
map:
aliases:
- api
db:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- "dbdata-dev:/data/db"
- "${MONGOD_CONF_LOCATION}:/etc/mongod.conf"
networks:
map:
aliases:
- db
playground:
image: node:latest
volumes:
- "${PROJECT_LOCATION}:/usr/app"
working_dir: /usr/app
command: bash -c "while :; do sleep 10; done"
networks:
map:
aliases:
- playground
volumes:
dbdata-dev:
networks:
map: