-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.03 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
version: "3.8"
services:
# MongoDB service
mongodb:
image: mongo
container_name: mongodb
volumes:
- data:/data/db
env_file:
- ./env/mongodb.env
networks:
- private
# Backend - Express service
babble-backend:
build:
context: ./babble-backend
dockerfile: Dockerfile
container_name: babble-backend
ports:
- "8080:8080"
volumes:
- ./babble-backend:/app/babble-backend
- /app/babble-backend/node_modules
env_file:
- ./env/backend.env
depends_on:
- mongodb
networks:
- private
# React - Frontend service
babble-frontend:
build:
context: ./babble-frontend
dockerfile: Dockerfile
container_name: babble-frontend
ports:
- "3000:3000"
volumes:
- ./babble-frontend:/app/babble-frontend
- /app/babble-frontend/node_modules
networks:
- private
networks:
private:
driver: bridge
# we are specifying explicitly to docker compose, that this is an named volume.
volumes:
data: