-
Notifications
You must be signed in to change notification settings - Fork 65
/
docker-compose.yml
51 lines (45 loc) · 1.08 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
version: "3.4"
volumes:
mongo_data:
name: appy_mongo_data
networks:
backend:
frontend:
services:
mongo:
image: mongo:3.6.4
ports:
- 27017:27017
volumes:
- "mongo_data:/data/db"
networks:
- backend
restart: always
api:
build: backend/
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
volumes:
# Share the entire project except "node_modules". This prevents us from having to COPY the project files
# in the Dockerfile, while still keeping separate node dependency files.
- "./backend:/backend"
- "/backend/node_modules"
networks:
- backend
depends_on:
- mongo
env_file:
- ./backend/.env-docker
web:
build: frontend/
ports:
- 3000:3000
volumes:
# Share the entire project except "node_modules". This prevents us from having to COPY the project files
# in the Dockerfile, while still keeping separate node dependency files.
- "./frontend:/frontend"
- "/frontend/node_modules"
networks:
- frontend
depends_on:
- api