-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
44 lines (44 loc) · 1.06 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
version: "3.5"
services:
back:
container_name: back
# restart: always
build: ./back
# Folders are binded to make app auto reload possible with nodemon inside the container
volumes:
- /app/node_modules # a named volume is created to avoid overriding
- ./back:/app
ports:
- "3000:3000"
- "3001:3001"
networks:
- appnetwork
depends_on:
- mongo
front:
container_name: front
# restart: always
build: ./front
# Folders are binded to make app auto reload possible with vue-cli inside the container
volumes:
- /app/node_modules # a named volume is created to avoid overriding
- ./front:/app
ports:
- "8080:8080"
networks:
- appnetwork
mongo:
container_name: mongo
image: mongo
# for persistent data on every run
volumes:
- ./data:/data/db
ports:
- "27017:27017"
networks:
- appnetwork
# the different containers are connected to the same network
networks:
appnetwork:
name: awesomeApp-network
driver: bridge