-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathdocker-compose.yml
278 lines (261 loc) · 5.96 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
version: '3.7'
services:
#########################################################################
# DB #
#########################################################################
mongodb:
image: mongo:4.4.0-rc7
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: indeedadmin
MONGO_INITDB_ROOT_PASSWORD: indeedadminpass
volumes:
- ./nosql-data:/data/db
- ./db-init-scripts:/docker-entrypoint-initdb.d
ports:
- 27017:27017
networks:
- indeed-net
mysqldb:
image: mysql
# platform: linux/x86_64
restart: unless-stopped
ports:
- 3306:3306
environment:
- MYSQL_USER=indeedadmin
- MYSQL_PASSWORD=indeedadminpass
- MYSQL_ROOT_PASSWORD=mysqlrootpassword
volumes:
- ./sql-data:/var/lib/mysql
- ./db-init-scripts:/docker-entrypoint-initdb.d
networks:
- indeed-net
redis:
image: redis
ports:
- 6379:6379
volumes:
- ./redis-data:/data
command: bash -c "redis-server --appendonly yes --requirepass indeedredispass"
networks:
- indeed-net
#########################################################################
# KAFKA #
#########################################################################
zookeeper:
image: confluentinc/cp-zookeeper:latest
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOOKEEPER_CLIENT_PORT=2181
networks:
- indeed-net
kafka:
image: confluentinc/cp-kafka:latest
ports:
- '9092:9092'
environment:
- KAFKA_BROKER_ID=1
- KAFKA_LISTNERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
- KAFKA_ADVERTISED_HOST_NAME=kafka
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper
networks:
- indeed-net
kafka-backend:
depends_on:
- kafka
- zookeeper
build:
context: ./kafka-backend
dockerfile: Dockerfile
volumes:
- type: bind
source: ./kafka-backend
target: /app
- type: bind
source: ./kafka-backend/node_modules
target: /app/node_modules
restart: unless-stopped
networks:
- indeed-net
#########################################################################
# SERVICES #
#########################################################################
auth:
depends_on:
- mysqldb
- kafka-backend
build:
context: ./auth
dockerfile: Dockerfile
ports:
- 7000:3000
volumes:
- type: bind
source: ./auth
target: /app
- type: bind
source: ./auth/node_modules
target: /app/node_modules
restart: unless-stopped
networks:
- indeed-net
company:
depends_on:
- mongodb
- kafka-backend
build:
context: ./company
dockerfile: Dockerfile
ports:
- 7001:3000
volumes:
- type: bind
source: ./company
target: /app
- type: bind
source: ./company/node_modules
target: /app/node_modules
restart: unless-stopped
networks:
- indeed-net
user:
depends_on:
- mongodb
- kafka-backend
build:
context: ./user
dockerfile: Dockerfile
ports:
- 7002:3000
volumes:
- type: bind
source: ./user
target: /app
- type: bind
source: ./user/node_modules
target: /app/node_modules
restart: unless-stopped
networks:
- indeed-net
application:
depends_on:
- mongodb
- kafka-backend
build:
context: ./application
dockerfile: Dockerfile
ports:
- 7003:3000
volumes:
- type: bind
source: ./application
target: /app
- type: bind
source: ./application/node_modules
target: /app/node_modules
restart: unless-stopped
networks:
- indeed-net
review:
depends_on:
- mongodb
- kafka-backend
build:
context: ./review
dockerfile: Dockerfile
ports:
- 7004:3000
volumes:
- type: bind
source: ./review
target: /app
- type: bind
source: ./review/node_modules
target: /app/node_modules
restart: unless-stopped
networks:
- indeed-net
photos:
depends_on:
- mongodb
- kafka-backend
build:
context: ./photos
dockerfile: Dockerfile
ports:
- 7005:3000
volumes:
- type: bind
source: ./photos
target: /app
- type: bind
source: ./photos/node_modules
target: /app/node_modules
restart: unless-stopped
networks:
- indeed-net
chat:
depends_on:
- mongodb
- kafka-backend
build:
context: ./chat
dockerfile: Dockerfile
ports:
- 7006:3000
volumes:
- type: bind
source: ./chat
target: /app
- type: bind
source: ./chat/node_modules
target: /app/node_modules
restart: unless-stopped
networks:
- indeed-net
web:
depends_on:
- application
- auth
- chat
- company
- photos
- review
- user
build:
context: ./web
dockerfile: Dockerfile
ports:
- 3000:3000
volumes:
- type: bind
source: ./web
target: /app
- type: bind
source: ./web/node_modules
target: /app/node_modules
restart: unless-stopped
networks:
- indeed-net
nginx:
depends_on:
- mongodb
image: nginx:alpine
ports:
- 8000:8000
volumes:
- type: bind
source: ./nginx/nginx.conf
target: /etc/nginx/conf.d/default.conf
restart: unless-stopped
networks:
- indeed-net
networks:
indeed-net: