forked from eiffel-community/eiffel-intelligence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
296 lines (283 loc) · 8.49 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
#################################################################################################
#
# Copyright 2019 Ericsson AB.
# For a full list of individual contributors, please see the commit history.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##################################################################################################
# docker-compose commands
#
# run: docker-compose up
# stop: docker-compose stop
# stop/remove: docker-compose down --volumes
#
# Cleanup/Remove (if needed):
# Dangling Volumes: docker volume rm `docker volume ls -q -f dangling=true`
# Unused Images: docker images -q | xargs docker rmi
# Stopped containers: docker rm `docker ps -a -q`
#
# Maintainer: Eiffel-Community
##################################################################################################
version: "2.1"
services:
mongodb-auth:
restart: always
image: ${MONGODB_IMAGE}
expose:
- "27017"
ports:
- "27016:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=admin123
healthcheck:
test: ["CMD-SHELL","echo", "'db.stats().ok' | mongo localhost:27017/test", "--quiet"]
interval: 30s
timeout: 10s
retries: 5
networks:
eiffel_2.0_1:
aliases:
- mongodb-auth
mongodb:
restart: always
image: ${MONGODB_IMAGE}
expose:
- "27017"
ports:
- "${MONGODB_PORT}:27017"
healthcheck:
test: ["CMD-SHELL","echo", "'db.stats().ok' | mongo localhost:27017/test", "--quiet"]
interval: 30s
timeout: 10s
retries: 5
networks:
eiffel_2.0_1:
aliases:
- mongodb
rabbitmq:
restart: always
image: ${RABBITMQ_IMAGE}
expose:
- "15672"
- "5672"
ports:
- "${RABBITMQ_WEB_PORT}:15672"
- "${RABBITMQ_AMQP_PORT}:5672"
healthcheck:
test: ["CMD-SHELL", "if rabbitmqctl status; then \nexit 0 \nfi \nexit 1"]
interval: 30s
timeout: 10s
retries: 5
networks:
eiffel_2.0_1:
aliases:
- rabbitmq
environment:
- RABBITMQ_PASSWORD=myuser
- RABBITMQ_USERNAME=myuser
- RABBITMQ_VHOST=/
eiffel-er:
restart: always
image: ${EIFFEL_ER_IMAGE}
expose:
- "8080"
ports:
- "${EIFFEL_ER_PORT}:8080"
depends_on:
- rabbitmq
- mongodb
networks:
eiffel_2.0_1:
aliases:
- eiffel-er
environment: # Overrides settings in config file in catalina folder. OBS --> skip quotes for rabbitmq.bindingKey value
# No config file copied to catalina folder in Dockerfile, only uses env vars below ;-)
# /eventrepository removed in contextpath
- server.contextPath=/
- server.port=8080
- rabbitmq.host=rabbitmq
- rabbitmq.componentName=eventrepository
- rabbitmq.port=${RABBITMQ_AMQP_PORT}
- rabbitmq.domainId=ei-domain
- rabbitmq.durable=true
- rabbitmq.user=myuser
- rabbitmq.password=myuser
- rabbitmq.exchangeName=ei-exchange
- rabbitmq.bindingKey=#
- rabbitmq.autoDelete=false
- rabbitmq.createExchangeIfNotExisting=true
- rabbitmq.consumerName=messageConsumer
- mongodb.host=mongodb
- mongodb.port=${MONGODB_PORT}
- mongodb.database=eiffel
- mongodb.collection=events
- mongodb.user
- mongodb.password
- mongodb.indexes=meta.id,links.target,links.type,meta.time,data.identity
- mongodb.externalERs
- search.limit=100
- search.levels=10
- eventrepo2.URL=
- index.staticIndex.indexOn=false
- index.staticIndex.filePath=src/main/resources/static_indexes.json
- index.dynamicIndex.indexOn=false
- index.dynamicIndex.indexCreationDay=SUNDAY
- index.dynamicIndex.indexCreationTime=11:50:00
- index.dynamicIndex.maxIndexesCount=5
- index.dynamicIndex.filePath=src/main/resources/dynamic_indexing.json
- index.dynamicIndex.fileUpdatePeriod=30
- WAIT_MB_HOSTS=rabbitmq:${RABBITMQ_WEB_PORT}
- WAIT_DB_HOSTS=mongodb:${MONGODB_PORT}
jenkins:
restart: always
image: ${JENKINS_IMAGE}
expose:
- "8080"
ports:
- "${JENKINS_PORT}:8080"
depends_on:
- rabbitmq
- mongodb
volumes:
- "./jenkins/security.groovy:/usr/share/jenkins/ref/init.groovy.d/security.groovy"
environment:
- JAVA_OPTS="-Djenkins.install.runSetupWizard=false" # To make sure unlock screen and plug-in install is skipped on start up
networks:
eiffel_2.0_1:
aliases:
- jenkins
mail-server:
image: ${MAILSERVER_IMAGE}
expose:
- "1025"
- "8025"
ports:
- "${MAIL_SMTP_PORT}:1025"
- "${MAIL_WEB_PORT}:8025"
depends_on:
- mongodb
environment:
MH_STORAGE: mongodb
MH_MONGO_URI: mongodb:${MONGODB_PORT}
MH_MONGO_COLLECTION: messages
MH_MONGO_DB: mailhog
networks:
eiffel_2.0_1:
aliases:
- mail-server
ei-backend:
restart: always
image: ${EI_BACKEND_IMAGE}
expose:
- "8080"
ports:
- "${EI_BACKEND_PORT}:8080"
depends_on:
- mongodb
- rabbitmq
networks:
eiffel_2.0_1:
aliases:
- ei-backend
environment: # Overrides settings in application config file
- spring.application.name=eiffel-intelligence-backend
- server.port=8080
- rules.path=src/main/resources/ArtifactRules.json
- rabbitmq.host=rabbitmq
- rabbitmq.port=${RABBITMQ_AMQP_PORT}
- rabbitmq.domainId=ei-domain
- rabbitmq.componentName=ei-backend
- rabbitmq.waitlist.queue.suffix=waitlist
- rabbitmq.exchange.name=ei-exchange
- rabbitmq.user=myuser
- rabbitmq.password=myuser
- spring.data.mongodb.uri=mongodb://mongodb:${MONGODB_PORT}
- spring.data.mongodb.database=eiffel2_intelligence
- failed.notification.collection-name=eiffel2_FailedNotification
- spring.mail.host=
- spring.mail.port=
- spring.mail.username=
- spring.mail.password=
- spring.mail.properties.mail.smtp.auth=false
- spring.mail.properties.mail.smtp.starttls.enable=false
- er.url=eiffel-er:${EIFFEL_ER_PORT}/search/
- WAIT_MB_HOSTS=rabbitmq:${RABBITMQ_WEB_PORT}
- WAIT_DB_HOSTS=mongodb:${MONGODB_PORT}
- logging.level.root=OFF
- logging.level.org.springframework.web=DEBUG
- logging.level.com.ericsson.ei=DEBUG
elasticsearch:
restart: always
image: ${ELASTICSEARCH_IMAGE}
ports:
- "${ELASTICSEARCH_PORT1}:9200"
- "${ELASTICSEARCH_PORT2}:9300"
depends_on:
- mongodb
environment:
- ES_JAVA_OPTS=-Xms2048m -Xmx2048m
- discovery.type=single-node
healthcheck:
test: "wget -q -O - http://localhost:9200/_cat/health"
interval: 1s
timeout: 30s
retries: 300
ulimits:
memlock:
soft: -1
hard: -1
networks:
eiffel_2.0_1:
aliases:
- elasticsearch
kibana:
restart: always
image: ${KIBANA_IMAGE}
expose:
- "8080"
ports:
- "${KIBANA_PORT}:8080"
depends_on:
- elasticsearch
environment:
- SERVER_PORT=8080
- SERVER_NAME=kibana.example.org
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
networks:
eiffel_2.0_1:
aliases:
- kibana
## monstache is used to sync from mongodb to elasticsearch using oplog in mongodb
monstache:
restart: always
image: ${MONSTACHE_IMAGE}
expose:
- "8080"
ports:
- "${MONSTACHE_PORT}:8080"
depends_on:
- mongodb
- elasticsearch
environment:
- MONSTACHE_MONGO_URL=mongodb:${MONGODB_PORT}
- MONSTACHE_ES_URLS=http://elasticsearch:9200
links:
- elasticsearch
networks:
eiffel_2.0_1:
aliases:
- monstache
networks:
eiffel_2.0_1: