-
Notifications
You must be signed in to change notification settings - Fork 125
/
docker-compose.yml
53 lines (51 loc) · 1016 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
version: '3'
services:
front:
build:
context: './frontend'
dockerfile: Dockerfile
ports:
- 3000:3000
container_name: react-container
command: npm start
networks:
- mern-stack-network
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- backend
backend:
build:
context: './backend'
dockerfile: Dockerfile
ports:
- 3030:3030
container_name: express-container
command: /app/node_modules/.bin/nodemon server.jsntainer
networks:
- mern-stack-network
volumes:
- ./backend:/app
- /app/node_modules
depends_on:
- mongo
env_file: ./server/.env
environment:
- NODE_ENV=development
mongo:
image: mongo
ports:
- 27017:27017
container_name: mongo-container
networks:
- mern-stack-network
volumes:
- mongoData:/data/db
networks:
mern-stack-network:
volumes:
mongoData:
node_modules:
web_root:
driver: local