forked from US-CBP/GTAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
230 lines (222 loc) · 7.01 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
version: "3.4"
services:
create_certs:
container_name: create_certs
image: docker.elastic.co/elasticsearch/elasticsearch:7.2.0
command: >
bash -c '
yum install -y -q -e 0 unzip;
if [[ ! -f /certs/bundle.zip ]]; then
bin/elasticsearch-certutil cert --silent --pem --in config/certificates/instances.yml -out /certs/bundle.zip;
unzip /certs/bundle.zip -d /certs;
fi;
chown -R 1000:0 /certs
'
user: "0"
working_dir: /usr/share/elasticsearch
volumes: ['certs:/certs','certs_logstash:/certs/logstash', './gtas-parent/scripts/elastic/config/elasticsearch:/usr/share/elasticsearch/config/certificates']
builder:
build:
context: ./docker
dockerfile: ./maven.Dockerfile
depends_on:
- mariahost
volumes:
- data:/root/.m2/
- ./gtas-parent:/project:cached
kibana:
# image: kibana:6.5.4
image: docker.elastic.co/kibana/kibana:7.2.0
container_name: kibana
ports:
- 5601:5601
networks:
- gtas_default
environment:
- SERVER_SSL_ENABLED=true
- SERVER_SSL_KEY=/usr/share/kibana/config/certs/kibana/kibana.key
- SERVER_SSL_CERTIFICATE=/usr/share/kibana/config/certs/kibana/kibana.crt
- ELASTICSEARCH_USERNAME=elastic
- ELASTICSEARCH_PASSWORD=$ELASTIC_PASSWORD
- ELASTICSEARCH_HOSTS=https://elasticsearch:9200
- ELASTICSEARCH_URL=https://elasticsearch:9200
- ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES=["/usr/share/kibana/config/certs/kibana/kibana.crt"]
- ELASTICSEARCH_SSL_VERIFICATIONMODE=none
- XPACK_SECURITY_ENABLED=true
depends_on:
- elasticsearch
healthcheck:
test: 'curl --cacert /usr/share/kibana/config/certs/ca/ca.crt -f https://kibana:5601 || exit 1'
volumes: ['certs:/usr/share/kibana/config/certs','$PWD/gtas-parent/scripts/elastic:/config/kibana']
elasticsearch:
image: elasticsearch:7.2.0
# build:
# context: ./gtas-parent/scripts/elastic
# dockerfile: install/docker/elasticsearch/Dockerfile
container_name: elasticsearch
networks:
- gtas_default
volumes: ['certs:$CERTS_DIR', "es-data:/usr/share/elasticsearch/data"]
ports:
- 9300:9300
- 9200:9200
environment:
- node.name=elasticsearch
- discovery.seed_hosts=elasticsearch
- cluster.initial_master_nodes=elasticsearch
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.license.self_generated.type=trial
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=true
- xpack.security.http.ssl.key=$CERTS_DIR/elasticsearch/elasticsearch.key
- xpack.security.http.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt
- xpack.security.http.ssl.certificate=$CERTS_DIR/elasticsearch/elasticsearch.crt
- xpack.security.transport.ssl.enabled=true
- xpack.security.transport.ssl.verification_mode=none
- xpack.security.transport.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt
- xpack.security.transport.ssl.certificate=$CERTS_DIR/elasticsearch/elasticsearch.crt
- xpack.security.transport.ssl.key=$CERTS_DIR/elasticsearch/elasticsearch.key
healthcheck:
test: curl --cacert /certs/ca/ca.crt https://elasticsearch:9200 >/dev/null; if [[ $$? == 52 ]]; then echo 0; else echo 1; fi
interval: 30s
timeout: 10s
retries: 5
# depends_on:
# - create_certs
logstash:
build:
dockerfile: ./install/docker/logstash/Dockerfile
context: ./gtas-parent/scripts/elastic
args:
DB_HOST: 'mariahost'
ELASTIC_HOST: 'elasticsearch'
container_name: logstash
volumes: ['certs_logstash:/usr/share/logstash/config/certs/']
environment:
- JAVA_OPTS=-Xms1g -Xmx1g
- ES_PWD=$ES_PWD
- LOGSTASH_DIR=/usr/share/logstash
- LOGSTASH_LIB=/usr/share/logstash/logstash-core/lib/jars
- ELASTICSEARCH_HOSTS=https://elasticsearch:9200
- XPACK_MONITORING_ENABLED=false
- XPACK_MONITORING_ELASTICSEARCH_USERNAME="elastic"
- XPACK_MONITORING_ELASTICSEARCH_PASSWORD=$ES_PWD
- XPACK_MONITORING_ELASTICSEARCH_HOSTS=https://elasticsearch:9200
- XPACK_MONITORING_ELASTICSEARCH_SSL_CERTIFICATE_AUTHORITY=/usr/share/logstash/config/certs/logstash.crt
- XPACK_MONITORING_ELASTICSEARCH_SSL_VERIFICATION_MODE=none
networks:
- gtas_default
depends_on:
- elasticsearch
- mariahost
activemq:
image: rmohr/activemq
container_name: activemq
ports:
- 61616:61616
- 8161:8161
networks:
- gtas_default
mariahost:
build:
context: .
dockerfile: ./docker/db.Dockerfile
ports:
- "3306:3306"
container_name: mariahost
volumes:
- db-data:/var/lib/mysql
command: [
'--wait_timeout=28800',
]
networks:
- gtas_default
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
webapp:
container_name: webapp
build:
context: .
dockerfile: ./gtas-parent/gtas-webapp/Dockerfile
args:
DB_HOST: 'mariahost'
DB_USERNAME: 'root'
DB_PASSWORD: 'admin'
ports:
- "8080:8080"
depends_on:
- mariahost
- elasticsearch
- kibana
volumes:
- data:/root/.m2
networks:
- gtas_default
scheduler:
container_name: scheduler
build:
context: .
dockerfile: ./gtas-parent/gtas-job-scheduler-war/Dockerfile
args:
DB_HOST: 'mariahost'
DB_USERNAME: 'root'
DB_PASSWORD: 'admin'
environment:
LOCAL_DRIVE_MAPPING_INPUT: ${LOCAL_DRIVE_MAPPING_INPUT}
LOCAL_DRIVE_MAPPING_OUTPUT: ${LOCAL_DRIVE_MAPPING_OUTPUT}
volumes:
- ${LOCAL_DRIVE_MAPPING_INPUT}:/usr/local/input:rw
- ${LOCAL_DRIVE_MAPPING_OUTPUT}:/usr/local/output:rw
- data:/root/.m2
networks:
- gtas_default
depends_on:
- mariahost
- activemq
neo4j:
build:
context: ./gtas-neo4j-etl
dockerfile: neo4j.Dockerfile
container_name: neo4j
ports:
- 7474:7474
- 7687:7687
networks:
- gtas_default
etl-job:
build:
context: ./gtas-neo4j-etl
dockerfile: ./etl_job.Dockerfile
container_name: etl-job
networks:
- gtas_default
depends_on:
- neo4j
- mariahost
- neo4j-scheduler
volumes:
- target:/root/.m2/
neo4j-scheduler:
build:
context: ./gtas-neo4j-scheduler
image: neo4j-scheduler
container_name: neo4j-scheduler
volumes:
- target:/root/.m2/
- ./gtas-neo4j-scheduler:/etl-project:cached
volumes:
es-data:
driver: local
db-data:
driver: local
data:
driver: local
target:
driver: local
certs:
driver: local
certs_logstash:
driver: local
networks:
gtas_default: