-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (67 loc) · 1.74 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# docker-compose.yml
version: "3.7"
services:
frontend:
env_file:
- ./.env
build: ./frontend
volumes:
- ./frontend:/var/www/app
# expose a named volume that works because installing
# and then mounting will hide that folder, so we need to explicitly
# show it again
# note that when reinstalling modules, we need to remove this volume
- fe_modules:/var/www/app/node_modules
ports:
- 3000:3000
# Debugger port
- 9222:9222
environment:
# The port hooked up to the API
- REACT_APP_API_PORT=5000
# Defines what port to use for development, i.e. localhost:$PORT for the frontend
- PORT=3000
command:
'npm start'
depends_on:
- backend
- db
tty: true
backend:
build: ./backend
env_file:
- ./.env
volumes:
- ./backend:/var/www/app
- ./assets:/var/www/app/assets
# expose a named volume that works because installing
# and then mounting will hide that folder, so we need to explicitly
# show it again
# note that when reinstalling modules, we need to remove this volume
- be_modules:/var/www/app/node_modules
ports:
- 5000:5000
# Debugger port
- 9229:9229
environment:
# Defines what port to use for development, i.e. localhost:$PORT for the frontend
- PORT=5000
- BYPASS_AUTH_ROLE=${BYPASS_AUTH_ROLE}
command:
'npm run start:dev'
depends_on:
- db
db:
image: 'mongo'
init: true
logging:
driver: none
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
# explicitly defines the volumes so that docker-compose down -v will destroy them
volumes:
fe_modules:
be_modules:
mongo_data: