forked from nikzagarwal/Project_21
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (62 loc) · 1.61 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
63
64
65
66
67
version: '3'
services:
project21-mongo:
image: mongo
container_name: project21-mongo
hostname: project21-mongo
restart: unless-stopped
command: mongod
ports:
- "27017:27017"
- "28017:28017"
volumes:
- mongodbdata:/data/db
networks:
- backend
project21-backend:
container_name: project21-backend
hostname: project21-backend
build:
context: ./
dockerfile: Dockerfile
environment:
MONGO_CONTAINER_NAME: 'project21-mongo'
FRONTEND_CONTAINER_NAME: 'localhost'
BACKEND_CONTAINER_NAME: 'localhost'
ports:
- "8000:8000"
volumes:
- ./Database:/Backend/Database
networks:
- frontend
- backend
depends_on:
- project21-mongo
links:
- project21-mongo
project21-frontend:
container_name: project21-frontend
hostname: project21-frontend
build:
context: Frontend/
dockerfile: Dockerfile
environment:
REACT_APP_FRONTEND_CONTAINER_NAME: 'localhost'
REACT_APP_BACKEND_CONTAINER_NAME: 'localhost:8000'
tty: true
ports:
- "3000:3000"
networks:
- frontend
depends_on:
- project21-backend
links:
- project21-backend
networks:
frontend:
driver: bridge
backend:
driver: bridge
volumes:
mongodbdata:
driver: local