-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
66 lines (63 loc) · 1.57 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
version: '3.7'
services:
backend:
build:
context: ./express
dockerfile: Dockerfile
image: findalicious-backend
container_name: findalicious-backend
ports:
- "3000:3000"
depends_on:
- mongo
environment:
- DB_URI=mongodb://mongo:27017/findalicious
- GOOGLE_MAPS_API_KEY=$GOOGLE_MAPS_API_KEY
- YELP_API_KEY=$YELP_API_KEY
volumes:
# Mount local /express dir for development
- ./express/bin:/usr/src/app/bin:z
- ./express/index.js:/usr/src/app/index.js:z
- ./express/socket.js:/usr/src/app/socket.js:z
- ./express/models:/usr/src/app/models:z
- ./express/routes:/usr/src/app/routes:z
networks:
- app-network
mongo:
image: mongo
container_name: findalicious-mongodb
volumes:
- database:/data/db
- database-config:/data/configdb
ports:
- "27017:27017"
networks:
- app-network
frontend:
build:
context: ./react
dockerfile: Dockerfile
image: findalicious-frontend
container_name: findalicious-frontend
depends_on:
- backend
environment:
# For React development server hot-reloading
- CHOKIDAR_USEPOLLING=true
- REACT_APP_EXPRESS_SERVER=http://localhost:3000
- PORT=5000
volumes:
# Mount local /react dir for development
- ./react/src:/usr/src/app/src:z
- ./react/public:/usr/src/app/public:z
ports:
- "5000:5000"
networks:
- app-network
stdin_open: true
networks:
app-network:
driver: bridge
volumes:
database:
database-config: