-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (52 loc) · 1006 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
43
44
45
46
47
48
49
50
51
52
version: "3.7"
services:
api-server:
build:
context: ./server
dockerfile: Dockerfile
image: api-server
command: /usr/src/app/node_modules/.bin/nodemon server.js
volumes:
- ./server/:/usr/src/app
- /usr/src/app/node_modules
ports:
- "5000:5000"
env_file: ./server/.env
environment:
- NODE_ENV=development
networks:
- mern-app
depends_on:
- mongo
mongo:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- mongodb:/data/db
networks:
- mern-app
react-app:
build:
context: ./client
dockerfile: Dockerfile
image: react-app
environment:
- CHOKIDAR_USEPOLLING=true
volumes:
- ./client/:/usr/app:delegated
- /usr/app/node_modules
ports:
- "3000:3000"
networks:
- mern-app
depends_on:
- api-server
networks:
mern-app:
driver: bridge
volumes:
mongodb:
node_modules:
web-root:
driver: local