-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.yaml
452 lines (452 loc) · 11.7 KB
/
docker-compose.yaml
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
version: "3.9"
services:
rdb:
container_name: "GuGoTik-Extra-PostgreSQL"
image: postgres
restart: unless-stopped
environment:
POSTGRES_PASSWORD: gugotik123
POSTGRES_DB: gugodb
POSTGRES_USER: gugotik
ports:
- "5436:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
pyroscope:
container_name: "GuGoTik-Extra-Pyroscope"
image: pyroscope/pyroscope
command:
- server
ports:
- "4040:4040"
stdin_open: true
tty: true
healthcheck:
test: [ "CMD-SHELL", "wget --spider -q http://localhost:4040/healthz || exit 1" ]
interval: 10s
timeout: 5s
retries: 3
consul:
container_name: "GuGoTik-Extra-Consul"
image: consul:1.15.4
command: [
"agent",
"-dev",
"-client=0.0.0.0"
]
ports:
- "8500:8500"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8500/v1/status/leader" ]
interval: 10s
timeout: 5s
retries: 3
redis:
container_name: "GuGoTik-Extra-Redis"
image: redis
ports:
- "6379:6379"
restart: unless-stopped
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 3
jaeger:
container_name: "GuGoTik-Extra-Jaeger"
image: jaegertracing/all-in-one
environment:
- COLLECTOR_OTLP_ENABLED=true
ports:
- "16686:16686"
- "14268:14268"
- "14250:14250"
- "6831:6831"
healthcheck:
test: [ "CMD-SHELL", "wget --spider -q http://localhost:16686/search || exit 1" ]
interval: 10s
timeout: 5s
retries: 3
victoriametrics:
container_name: "GuGoTik-Extra-VictoriaMetrics"
image: victoriametrics/victoria-metrics
ports:
- "8428:8428"
- "8089:8089"
- "8089:8089/udp"
- "2003:2003"
- "2003:2003/udp"
- "4242:4242"
command:
- '--storageDataPath=/storage'
- '--graphiteListenAddr=:2003'
- '--opentsdbListenAddr=:4242'
- '--httpListenAddr=:8428'
- '--influxListenAddr=:8089'
restart: always
grafana:
container_name: "GuGoTik-Extra-Grafana"
image: grafana/grafana
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
ports:
- "3000:3000"
elasticsearch:
image: elasticsearch:7.17.12
container_name: "GuGoTik-Extra-ElasticSearch"
restart: always
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
- cluster.routing.allocation.disk.threshold_enabled=false
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "9200:9200"
healthcheck:
test: [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1" ]
interval: 10s
timeout: 5s
retries: 3
kibana:
image: kibana:7.17.12
container_name: "GuGoTik-Extra-Kibana"
restart: always
environment:
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
I18N_LOCALE: zh-CN
ports:
- "5601:5601"
influxdb:
container_name: "GuGoTik-Extra-InfluxDB"
image: tutum/influxdb
ports:
- "8083:8083"
- "8011:8086"
rabbitmq:
container_name: "GuGoTik-Extra-RabbitMQ"
image: epicmo/rabbitmq-manager:1.0
ports:
- "15672:15672"
- "5672:5672"
healthcheck:
test: [ "CMD-SHELL", "rabbitmqctl status" ]
interval: 10s
timeout: 5s
retries: 5
prometheus:
container_name: "GuGoTik-Extra-Prometheus"
image: bitnami/prometheus:latest
volumes:
- ./promethus.docker.compose.yml:/opt/bitnami/prometheus/conf/prometheus.yml
ports:
- "9090:9090"
gorse-master:
image: zhenghaoz/gorse-master
restart: unless-stopped
ports:
- "8086:8086"
- "8088:8088"
environment:
GORSE_CACHE_STORE: redis://redis:6379
GORSE_DATA_STORE: postgres://gugotik:gugotik123@rdb/gugodb?sslmode=disable
command: >
-c /etc/gorse/config.toml
--log-path /var/log/gorse/master.log
--cache-path /var/lib/gorse/master_cache.data
volumes:
- ./gorse-config.docker.compose.toml:/etc/gorse/config.toml
depends_on:
redis:
condition: service_healthy
rdb:
condition: service_healthy
gorse-worker:
image: zhenghaoz/gorse-worker
restart: unless-stopped
ports:
- "8099:8099"
command: >
--master-host gorse-master --master-port 8086
--http-host 0.0.0.0 --http-port 8099
--log-path /var/log/gorse/worker.log
--cache-path /var/lib/gorse/worker_cache.data
depends_on:
- gorse-master
gorse-server:
image: zhenghaoz/gorse-server
restart: unless-stopped
ports:
- "8087:8087"
command: >
--master-host gorse-master --master-port 8086
--http-host 0.0.0.0 --http-port 8087
--log-path /var/log/gorse/server.log
--cache-path /var/lib/gorse/server_cache.data
depends_on:
- gorse-master
static:
image: nginx
container_name: "GuGoTik-StaticServer"
ports:
- "8066:80"
volumes:
- share-volume:/usr/share/nginx/html/
auth:
container_name: "GuGoTik-AuthService"
build:
dockerfile: Dockerfile
ports:
- "37001:37001"
env_file:
- .env.docker.compose
command: ["/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/auth/AuthService"]
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
comment:
container_name: "GuGoTik-CommentService"
build:
dockerfile: Dockerfile
ports:
- "37003:37003"
env_file:
- .env.docker.compose
command: ["/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/comment/CommentService"]
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
rabbitmq:
condition: service_healthy
favorite:
container_name: "GuGoTik-FavoriteService"
build:
dockerfile: Dockerfile
ports:
- "37006:37006"
env_file:
- .env.docker.compose
command: ["/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/favorite/FavoriteService"]
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
rabbitmq:
condition: service_healthy
feed:
container_name: "GuGoTik-FeedService"
build:
dockerfile: Dockerfile
ports:
- "37004:37004"
env_file:
- .env.docker.compose
command: ["/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/feed/FeedService"]
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
rabbitmq:
condition: service_healthy
message:
container_name: "GuGoTik-MessageService"
build:
dockerfile: Dockerfile
ports:
- "37007:37007"
env_file:
- .env.docker.compose
command: ["/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/message/MessageService"]
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
rabbitmq:
condition: service_healthy
publish:
container_name: "GuGoTik-PublishService"
build:
dockerfile: Dockerfile
ports:
- "37005:37005"
env_file:
- .env.docker.compose
command: ["/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/publish/PublishService"]
volumes:
- share-volume:/usr/share/nginx/html/
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
rabbitmq:
condition: service_healthy
relation:
container_name: "GuGoTik-RelationService"
build:
dockerfile: Dockerfile
ports:
- "37008:37008"
env_file:
- .env.docker.compose
command: ["/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/relation/RelationService"]
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
user:
container_name: "GuGoTik-UserService"
build:
dockerfile: Dockerfile
ports:
- "37002:37002"
env_file:
- .env.docker.compose
command: ["/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/user/UserService"]
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
videoprocessor:
container_name: "GuGoTik-VideoProcessorService"
build:
dockerfile: Dockerfile
env_file:
- .env.docker.compose
command: ["/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/videoprocessor/VideoprocessorService"]
volumes:
- share-volume:/usr/share/nginx/html/
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
rabbitmq:
condition: service_healthy
msgconsumer:
container_name: "GuGoTik-MsgConsumerService"
build:
dockerfile: Dockerfile
env_file:
- .env.docker.compose
command: [ "/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/msgconsumer/MsgconsumerService" ]
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
rabbitmq:
condition: service_healthy
elasticsearch:
condition: service_healthy
recommend:
container_name: "GuGoTik-RecommendService"
build:
dockerfile: Dockerfile
ports:
- "37009:37009"
env_file:
- .env.docker.compose
command: [ "/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/recommend/RecommendService" ]
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
rabbitmq:
condition: service_healthy
event:
container_name: "GuGoTik-EventService"
build:
dockerfile: Dockerfile
env_file:
- .env.docker.compose
command: [ "/bin/sh", "-c", "export POD_IP=`hostname -i` && ./services/event/EventService" ]
depends_on:
rdb:
condition: service_healthy
consul:
condition: service_healthy
redis:
condition: service_healthy
jaeger:
condition: service_healthy
rabbitmq:
condition: service_healthy
gateway:
container_name: "GuGoTik-GateWay"
build:
dockerfile: Dockerfile
ports:
- "37000:37000"
env_file:
- .env.docker.compose
command: ["/bin/sh", "-c", "export POD_IP=`hostname -i` && ./gateway/Gateway"]
depends_on:
rdb:
condition: service_healthy
jaeger:
condition: service_healthy
volumes:
share-volume: