-
Notifications
You must be signed in to change notification settings - Fork 34
/
docker-compose.yml
320 lines (300 loc) · 9.13 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
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
services:
blacklight:
container_name: blacklight
build:
context: ./blacklight
dockerfile: Dockerfile
volumes:
- ./blacklight/app:/app/app
ports:
- 4000:3000
- 9394:9394
command: "foreman s -f Procfile"
environment:
- SOLR_URL=http://${SOLR_USER}:${SOLR_PASSWORD}@solr1:8983/solr/ecommerce
- PORT=3000
- OTEL_EXPORTER_JAEGER_ENDPOINT=http://jaeger:14268/api/traces
depends_on:
- solr1
# - jaeger
mysql:
container_name: mysql
image: mysql:8.3.0
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=password
volumes:
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
healthcheck:
test: "/usr/bin/mysql --user=root --password=password --execute \"SHOW DATABASES;\""
interval: 10s
timeout: 30s
smui:
container_name: smui
build:
context: ./smui
dockerfile: Dockerfile
ports:
- 9000:9000
environment:
- SMUI_HEADLINE=Chorus SMUI
- SMUI_DB_URL=jdbc:mysql://mysql:3306/smui?autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
- SMUI_DB_USER=root
- SMUI_DB_PASSWORD=${SMUI_DB_PASSWORD}
- SMUI_DEPLOY_PRELIVE_SOLR_HOST=${SOLR_USER}:${SOLR_PASSWORD}@solr1:8983
- SMUI_2SOLR_SOLR_HOST=${SOLR_USER}:${SOLR_PASSWORD}@solr1:8983
- SMUI_TOGGLE_DEPL_PRELIVE=true
- SMUI_TOGGLE_SPELLING=true
- SMUI_TOGGLE_DEPL_CUSTOM_SCRIPT=true
- SMUI_TOGGLE_DEPL_CUSTOM_SCRIPT_PATH=/smui/conf/smui2solrcloud.sh
- SMUI_DEPLOY_PRELIVE_FN_RULES_TXT=/configs/ecommerce/rules.txt
- SMUI_DEPLOY_PRELIVE_FN_REPLACE_TXT=/configs/ecommerce/replace-rules.txt
- SMUI_TOGGLE_RULE_ID_LOGGING=true
- SMUI_TOGGLE_EVENTHISTORY=true
- SMUI_RULE_TAGGING_ACTIVE=true
- SMUI_PREDEFINED_TAGS_FILE=/smui/conf/predefined_tags.json
- SMUI_RULE_USAGE_STATISTICS_LOCATION=file:///smui/data/rules-usage-stats.csv
volumes:
- ./smui/data/:/smui/data
depends_on:
- mysql
solr1:
container_name: solr1
build: ./solr
ports:
- "8983:8983"
environment:
- SOLR_OPTS=-XX:-UseLargePages
- SOLR_HEAP=1g
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
- JAEGER_SERVICE_NAME=solr1 # not working ;-(
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=${JAEGER_SAMPLER_PARAM}
- JAEGER_AGENT_HOST=jaeger
- JAEGER_AGENT_PORT=5775
- "SOLR_OPTS=-Dsolr.auth.jwt.allowOutboundHttp=true -Dsolr.modules=jwt-auth,jaegertracer-configurator"
depends_on:
- zoo1
- zoo2
- zoo3
- keycloak
solr2:
container_name: solr2
build: ./solr
ports:
- "8984:8983"
environment:
- SOLR_OPTS=-XX:-UseLargePages
- SOLR_HEAP=1g
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
- JAEGER_SERVICE_NAME=solr2
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=${JAEGER_SAMPLER_PARAM}
- JAEGER_AGENT_HOST=jaeger
- JAEGER_AGENT_PORT=5775
- "SOLR_OPTS=-Dsolr.auth.jwt.allowOutboundHttp=true -Dsolr.modules=jwt-auth,jaegertracer-configurator"
depends_on:
- zoo1
- zoo2
- zoo3
- keycloak
solr3:
container_name: solr3
build: ./solr
ports:
- "8985:8983"
environment:
- SOLR_OPTS=-XX:-UseLargePages
- SOLR_HEAP=1g
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
- JAEGER_SERVICE_NAME=solr3
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=${JAEGER_SAMPLER_PARAM}
- JAEGER_AGENT_HOST=jaeger
- JAEGER_AGENT_PORT=5775
- "SOLR_OPTS=-Dsolr.auth.jwt.allowOutboundHttp=true -Dsolr.modules=jwt-auth,jaegertracer-configurator"
depends_on:
- zoo1
- zoo2
- zoo3
- keycloak
zoo1:
image: zookeeper:3.9.2
container_name: zoo1
hostname: zoo1
ports:
- 2181:2181
- 7001:7000
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok
ZOO_CFG_EXTRA: "metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider metricsProvider.httpPort=7000 metricsProvider.exportJvmInfo=true"
zoo2:
image: zookeeper:3.9.2
container_name: zoo2
hostname: zoo2
ports:
- 2182:2181
- 7002:7000
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok
ZOO_CFG_EXTRA: "metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider metricsProvider.httpPort=7000 metricsProvider.exportJvmInfo=true"
zoo3:
image: zookeeper:3.9.2
container_name: zoo3
hostname: zoo3
ports:
- 2183:2181
- 7003:7000
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
ZOO_4LW_COMMANDS_WHITELIST: mntr,conf,ruok
ZOO_CFG_EXTRA: "metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider metricsProvider.httpPort=7000 metricsProvider.exportJvmInfo=true"
redis:
container_name: quepid_redis
image: redis:6.2.7-alpine
ports:
- 6379:6379
quepid:
container_name: quepid
image: o19s/quepid:7.15.1
ports:
- 3000:3000
command: "foreman s -f Procfile"
environment:
- PORT=3000
- RACK_ENV=production
- RAILS_ENV=production
- DATABASE_URL=mysql2://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/quepid
- REDIS_URL=redis://redis:6379/1
- FORCE_SSL=false
- MAX_THREADS=2
- WEB_CONCURRENCY=2
- RAILS_LOG_TO_STDOUT=true
- RAILS_SERVE_STATIC_FILES=true
- SECRET_KEY_BASE=chorus_key
- TC_URL=
- PRIVACY_URL=
- COOKIES_URL=
- EMAIL_MARKETING_MODE=false
- EMAIL_PROVIDER=
- QUEPID_DEFAULT_SCORER=AP@10
- KEYCLOAK_REALM=chorus
- KEYCLOAK_SITE=http://keycloak:9080
- SIGNUP_ENABLED=true
links:
- mysql
- redis
depends_on:
- mysql
- redis
embeddings:
container_name: embeddings
build:
context: ./embeddings
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- OMP_NUM_THREADS=1
deploy:
resources:
limits:
memory: 10G
reservations:
memory: 512M
solr-exporter:
image: solr:9.1.1
container_name: solr-exporter
hostname: solr-exporter
ports:
- 9854:9854
command: /bin/bash -c "/usr/bin/wait-for-http-200.sh; export JAVA_OPTS='-Dsolr.httpclient.builder.factory=org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory -Dsolr.httpclient.config=/home/basicauth.properties'; ./contrib/prometheus-exporter/bin/solr-exporter -p 9854 -z zoo1:2181,zoo2:2181,zoo3:2181 -f ./contrib/prometheus-exporter/conf/solr-exporter-config.xml -n 8 -s 15"
volumes:
- ./solr-exporter/wait-for-http-200.sh:/usr/bin/wait-for-http-200.sh
- ./solr-exporter/basicauth.properties:/home/basicauth.properties
depends_on:
- solr1
- solr2
- solr3
prometheus:
image: prom/prometheus:v2.32.1
container_name: prometheus
restart: always
hostname: prometheus
healthcheck:
test: ["CMD", "wget", "--tries=1", "--spider", "http://localhost:9090"]
interval: 5s
timeout: 10s
ports:
- 9090:9090
command:
- '--config.file=/etc/prometheus/prometheus.yml'
volumes:
- ./prometheus/:/etc/prometheus/
grafana:
image: grafana/grafana:7.5.17
container_name: grafana
restart: unless-stopped
hostname: grafana
healthcheck:
test: ["CMD", "wget", "--tries=1", "--spider", "http://localhost:3000"]
interval: 5s
timeout: 10s
ports:
- 9091:3000
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
- GF_USERS_ALLOW_SIGN_UP=true
depends_on:
- prometheus
jaeger:
image: jaegertracing/all-in-one:1.39
container_name: jaeger
restart: always
hostname: jaegertracing
ports:
- 6831:6831/udp
- 6832:6832/udp
- 5778:5778
- 16686:16686
- 4317:4317
- 4318:4318
- 14250:14250
- 14268:14268
- 14269:14269
- 9411:9411
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
environment:
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
- COLLECTOR_OTLP_ENABLED=true
keycloak:
image: chorus-keycloak
container_name: keycloak
build:
context: ./keycloak
dockerfile: Dockerfile
command: start --optimized --import-realm
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
ports:
- 9080:9080
environment:
- KC_HTTP_ENABLED=true
- KC_HTTP_PORT=9080
- KC_HOSTNAME=keycloak
- KC_HOSTNAME_STRICT=false
- KC_HOSTNAME_STRICT_HTTPS=false
- PROXY_ADDRESS_FORWARDING=true
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=password
- DB_VENDOR=h2