-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
Copy pathdocker-compose.yml
103 lines (96 loc) · 3.78 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
version: '2.3'
services:
# This is a proxy used to block "docker-compose up" until all services are healthy.
# See: https://github.com/docker/compose/issues/4369
proxy_dep:
image: busybox
depends_on:
elasticsearch: { condition: service_healthy }
elasticsearchssl: { condition: service_healthy }
logstash: { condition: service_healthy }
kafka: { condition: service_healthy }
redis: { condition: service_healthy }
sredis: { condition: service_healthy }
kibana: { condition: service_healthy }
healthcheck:
interval: 1s
retries: 1200
elasticsearch:
extends:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: elasticsearch
healthcheck:
test: ["CMD-SHELL", "curl -u admin:testing -s http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 300
interval: 1s
ports:
- 9200:9200
elasticsearchssl:
extends:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: elasticsearch
healthcheck:
test: ["CMD", "curl", "-u", "admin:testing", "-f", "https://localhost:9200", "--insecure"]
retries: 1200
interval: 5s
start_period: 60s
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "transport.host=127.0.0.1"
- "http.host=0.0.0.0"
- "xpack.security.enabled=true"
- "indices.id_field_data.enabled=true"
- "xpack.license.self_generated.type=trial"
- "xpack.security.http.ssl.enabled=true"
- "xpack.security.http.ssl.key=/usr/share/elasticsearch/config/pki/elasticsearchssl/elasticsearchssl.key"
- "xpack.security.http.ssl.certificate=/usr/share/elasticsearch/config/pki/elasticsearchssl/elasticsearchssl.crt"
- "xpack.security.http.ssl.certificate_authorities=/usr/share/elasticsearch/config/pki/ca/ca.crt"
# Do no used indices as the storage for credentials, using file based allow Elasticsearch
# to be online and green much quicker.
- "xpack.security.authc.realms.file.file1.order=0"
volumes:
- ${ES_BEATS}/testing/environments/docker/elasticsearch/pki:/usr/share/elasticsearch/config/pki:ro
- ${ES_BEATS}/testing/environments/docker/elasticsearch/roles.yml:/usr/share/elasticsearch/config/roles.yml
- ${ES_BEATS}/testing/environments/docker/elasticsearch/users:/usr/share/elasticsearch/config/users
- ${ES_BEATS}/testing/environments/docker/elasticsearch/users_roles:/usr/share/elasticsearch/config/users_roles
ports:
- 9201:9200
# This host name is static because of the certificate.
logstash:
extends:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: logstash
depends_on:
elasticsearch:
condition: service_healthy
redis:
build: ${ES_BEATS}/testing/environments/docker/redis
ports:
- 6379:6379
# This host name is static because of the certificate.
sredis: # stunnel proxy for redis
build: ${ES_BEATS}/testing/environments/docker/sredis
depends_on:
redis:
condition: service_healthy
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
ports:
- 6380:6380
kafka:
build: ${ES_BEATS}/testing/environments/docker/kafka
ports:
- 9092:9092
- 9093:9093
- 9094:9094
- 2181:2181
environment:
- ADVERTISED_HOST=kafka
kibana:
extends:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: kibana
healthcheck:
test: ["CMD-SHELL", "curl -u beats:testing -s http://localhost:5601/api/status?v8format=true | grep -q '\"overall\":{\"level\":\"available\"'"]
retries: 600