-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yml
242 lines (227 loc) · 6.77 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
version: '3.7'
services:
setup:
image: docker.elastic.co/elasticsearch/elasticsearch:8.5.3
user: "0"
command: >
bash -c '
if [ x${ELASTIC_PASSWORD} == x ]; then
echo "Set the ELASTIC_PASSWORD environment variable in the .env file";
exit 1;
elif [ x${KIBANA_PASSWORD} == x ]; then
echo "Set the KIBANA_PASSWORD environment variable in the .env file";
exit 1;
fi;
echo "Waiting for Elasticsearch availability";
until curl -u 'elastic:${ELASTIC_PASSWORD}' -s elasticsearch:9200/_cluster/health | grep "yellow"; do sleep 30; done;
echo "Setting kibana_system password";
until curl -s -X POST -u "elastic:${ELASTIC_PASSWORD}" -H "Content-Type: application/json" http://elasticsearch:9200/_security/user/kibana_system/_password -d "{\"password\":\"${KIBANA_PASSWORD}\"}" | grep -q "^{}"; do sleep 10; done;
echo "All done!";
'
mysql:
container_name: mysql
image: amd64/mysql:5.7.42
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=smui
volumes:
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- mysql_data:/var/lib/mysql
elasticsearch:
depends_on:
- setup
container_name: elasticsearch
build: ./elasticsearch/.
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.type=single-node"
- xpack.security.enabled=true # override what is in elasticsearch.yml
- bootstrap.memory_lock=true
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD} # default username is elastic
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- es_data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
healthcheck:
test: [ "CMD", "wget", "http://localhost:9200" ]
interval: 30s
timeout: 10s
retries: 50
kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:8.5.3
environment:
- SERVERNAME=kibana
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=${KIBANA_PASSWORD}
ports:
- 5601:5601
chorus-ui:
container_name: chorus_ui
build: ./reactivesearch/.
volumes:
- './reactivesearch:/usr/src/app'
- '/usr/src/app/node_modules'
ports:
- 4000:3000
quepid:
container_name: quepid
image: o19s/quepid:6.14.0
ports:
- 3000:3000
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=DCG@10
- KEYCLOAK_REALM=chorus
- KEYCLOAK_SITE=http://keycloak:9080
- SIGNUP_ENABLED=true
links:
- mysql
- redis
redis:
container_name: quepid_redis
image: redis:7.0.11-alpine
ports:
- 6379:6379
smui:
container_name: smui
build: ./smui
ports:
- 9000:9000
init: true
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=elasticsearch:9200
- SMUI_TOGGLE_UI_WITH_SOLR_FIELDS=false
- SMUI_TOGGLE_PRELIVE_NAME=Preview
- SMUI_2SOLR_SOLR_HOST=elasticsearch:9200
- SMUI_TOGGLE_DEPL_PRELIVE=true
- SMUI_TOGGLE_SPELLING=true
- SMUI_TOGGLE_DEPL_CUSTOM_SCRIPT=true
- SMUI_TOGGLE_DEPL_CUSTOM_SCRIPT_PATH=/smui/conf/smui2es.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_AUTH_CLIENT=DirectBasicAuthClient
- SMUI_BASIC_AUTH_USER=admin
- SMUI_BASIC_AUTH_PASS=password
depends_on:
- mysql
prometheus:
image: prom/prometheus:v2.32.1
container_name: prometheus
restart: always
ports:
- 9090:9090
command:
- '--config.file=/etc/prometheus/prometheus.yml'
healthcheck:
test: [ "CMD", "wget", "--tries=1", "--spider", "http://localhost:9090" ]
interval: 5s
timeout: 10s
volumes:
- ./prometheus/:/etc/prometheus/
grafana:
image: grafana/grafana:7.5.17
container_name: grafana
restart: always
ports:
- 9091:3000
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
- GF_USERS_ALLOW_SIGN_UP=true
healthcheck:
test: [ "CMD", "wget", "--tries=1", "--spider", "http://localhost:3000" ]
interval: 5s
timeout: 10s
depends_on:
- prometheus
rre:
container_name: rre
build:
context: ./rre
dockerfile: Dockerfile
volumes:
- ./rre:/rre
ports:
- "7979:8080"
command: "java -jar rre-server-1.1.jar"
depends_on:
- elasticsearch
embeddings:
container_name: embeddings
build:
context: ./embeddings
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- OMP_NUM_THREADS=1
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 512M
elasticsearch-exporter:
image: quay.io/prometheuscommunity/elasticsearch-exporter:latest
container_name: elasticsearch-exporter
command:
- '--es.uri=http://elasticsearch:9200'
environment:
- ES_USERNAME=elastic
- ES_PASSWORD=${ELASTIC_PASSWORD}
restart: always
ports:
- "9114:9114"
keycloak:
image: quay.io/keycloak/keycloak:21.0.2
container_name: keycloak
hostname: keycloak
command: [ "start-dev", "--import-realm" ]
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "--fail", "http://localhost:8080/health" ]
ports:
- 9080:9080
environment:
KC_HTTP_PORT: 9080
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
DB_VENDOR: h2
volumes:
- ./keycloak/realm-config/chorus-realm.json:/opt/keycloak/data/import/chorus-realm.json:ro
volumes:
mysql_data: {}
es_data: {}