-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yml
62 lines (59 loc) · 1.41 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
version: "3"
services:
mongo:
container_name: mongo-mern-docker-boilerplate
image: mongo
restart: always
ports:
- "27018:27017"
networks:
- default
volumes:
- ./backend/docker-setup/mongo/db-init.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
- ./backend/docker-setup/mongo/mongo-volume:/data/db
environment:
- MONGO_INITDB_DATABASE=mern_docker_starter
- MONGO_INITDB_USER=local_user
- MONGO_INITDB_PASSWORD=Password123
backend:
container_name: node-mern-docker-boilerplate
build:
context: ./backend
dockerfile: docker-setup/node/development/Dockerfile
networks:
- default
- frontend
volumes:
- ./backend:/home/node/app
environment:
- NODE_ENV=development
env_file:
- ./backend/.env.development
tty: true
stdin_open: true
depends_on:
- mongo
ports:
- "5000:4000"
frontend:
container_name: react-mern-docker-boilerplate
build:
context: ./frontend
dockerfile: docker-setup/react/development/Dockerfile
networks:
- frontend
environment:
- NODE_ENV=development
volumes:
- ./frontend:/frontend
depends_on:
- backend
tty: true
stdin_open: true
ports:
- "3000:3000"
networks:
default:
name: backend-network-mern-docker-boilerplate
frontend:
name: frontend-network-mern-docker-boilerplate