-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
59 lines (55 loc) · 1.86 KB
/
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
name: elastic-stack
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
container_name: elasticsearch
ports:
- 9200:9200
environment:
- node.name=elasticsearch
- cluster.name=docker-cluster
- discovery.type=single-node
- ELASTIC_PASSWORD=elastic
- bootstrap.memory_lock=true
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
- xpack.license.self_generated.type=trial
- ES_JAVA_OPTS=-Xmx8g
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: [ "CMD-SHELL", "curl -s http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=500ms" ]
retries: 300
interval: 1s
elasticsearch_settings:
depends_on:
elasticsearch:
condition: service_healthy
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
container_name: elasticsearch_settings
restart: 'no'
command: >
bash -c '
echo "Setup the kibana_system password";
until curl -s -u "elastic:elastic" -X POST http://elasticsearch:9200/_security/user/kibana_system/_password -d "{\"password\":\"elastic\"}" -H "Content-Type: application/json" | grep -q "^{}"; do sleep 5; done;
'
kibana:
image: docker.elastic.co/kibana/kibana:8.17.0
container_name: kibana
depends_on:
elasticsearch_settings:
condition: service_completed_successfully
ports:
- 5601:5601
environment:
- SERVERNAME=kibana
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=elastic
healthcheck:
test: [ "CMD-SHELL", "curl -s http://localhost:5601/api/status | grep -q 'All services are available'" ]
retries: 300
interval: 1s