-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
104 lines (101 loc) · 2.16 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: "3.8"
services:
proxy:
image: nginx
container_name: proxy
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
restart: "unless-stopped"
links:
- user-service
- content-service
- interaction-service
depends_on:
- user-service
- content-service
- interaction-service
networks:
- microservice-network
user-service:
build:
context: ./user/
target: development-build-stage
dockerfile: Dockerfile
container_name: user-service
environment:
- MONGO_URI=mongodb://db:27017/user-ms-db
- PORT=3000
ports:
- "3000:3000"
volumes:
- ./user:/app
- /app/node_modules
restart: "unless-stopped"
networks:
- microservice-network
links:
- db
depends_on:
- db
content-service:
build:
context: ./content/
target: development-build-stage
dockerfile: Dockerfile
container_name: content-service
environment:
- MONGO_URI=mongodb://db:27017/content-ms-db
- USER_SERVICE_URL=http://user-service:3000
- INTERACTION_SERVICE_URL=http://interaction-service:3002
- PORT=3001
ports:
- "3001:3001"
volumes:
- ./content:/app
- /app/node_modules
restart: "unless-stopped"
networks:
- microservice-network
links:
- db
depends_on:
- db
interaction-service:
build:
context: ./interaction/
target: development-build-stage
dockerfile: Dockerfile
container_name: interaction-service
environment:
- MONGO_URI=mongodb://db:27017/interaction-ms-db
- USER_SERVICE_URL=http://user-service:3000
- PORT=3002
ports:
- "3002:3002"
volumes:
- ./interaction:/app
- /app/node_modules
restart: "unless-stopped"
networks:
- microservice-network
links:
- db
depends_on:
- db
db:
image: mongo
container_name: db
volumes:
- data:/data/db
ports:
- "27017:27017"
networks:
- microservice-network
networks:
microservice-network:
driver: bridge
volumes:
data:
driver: local