generated from nyu-software-engineering/generic-mern-stack-project
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
56 lines (51 loc) · 1005 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
53
54
55
56
version: "3"
services:
client:
build:
context: front-end
dockerfile: Dockerfile
ports:
- 7002:7002
networks:
- mern-network
volumes:
- front-end/src
- front-end/public
depends_on:
- server
environment:
- REACT_APP_SERVER=http://localhost:5002
- CHOKIDAR_USEPOLLING=true
command: npm start
stdin_open: true
tty: true
server:
build:
context: back-end
dockerfile: Dockerfile
ports:
- 5002:5002
networks:
- mern-network
volumes:
- back-end
depends_on:
- db
environment:
- MONGO_URL=mongodb://db:27017
- CLIENT=http://localhost:7002
command: /usr/app/node_modules/.bin/nodemon -L src/index.js
db:
image: mongo:3.6.19-xenial
ports:
- 27017:27017
networks:
- mern-network
volumes:
- mongo-data: back-end/database
networks:
mern-network:
driver: bridge
volumes:
mongo-data:
driver: local