-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.elk.yml
93 lines (87 loc) · 2.6 KB
/
docker-compose.elk.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
version: "3"
services:
setup-elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:8.1.1
command: >
bash -c '
echo "Setting kibana password";
until curl -s -X POST -u "elastic:${ELASTIC_PASSWORD}" -H "Content-Type: application/json" http://elastic:9200/_security/user/kibana_system/_password -d "{\"password\":\"${ELASTIC_PASSWORD}\"}" | grep -q "^{}"; do sleep 10; done;
echo "All done!";'
networks:
- sgp-network
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:8.1.1
volumes:
- elasticdata:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
environment:
- node.name=sgp-elastic-node
- cluster.name=sgp-elastic
- discovery.type=single-node
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
- xpack.license.self_generated.type=basic
mem_limit: 1073741824
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200 || grep -q 'missing authentication credentials'"]
interval: 30s
timeout: 20s
retries: 5
ulimits:
memlock:
soft: -1
hard: -1
networks:
- sgp-network
kibana:
image: docker.elastic.co/kibana/kibana:8.1.1
volumes:
- kibanadata:/usr/share/kibana/data
- ./configuracoes/kibana.yml:/usr/share/kibana/config/kibana.yml
ports:
- 5601:5601
environment:
- SERVERNAME=kibana
- ELASTICSEARCH_HOSTS=http://elastic:9200
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=${ELASTIC_PASSWORD}
mem_limit: 1073741824
depends_on:
elastic:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -I -s -L http://localhost:5601 || exit 1"]
interval: 30s
timeout: 20s
retries: 5
networks:
- sgp-network
apm:
image: docker.elastic.co/apm/apm-server:8.1.1
ports:
- 8200:8200
command: >
apm-server -e
-E output.elasticsearch.hosts=["elastic:9200"]
-E output.elasticsearch.protocol=http
-E output.elasticsearch.username=elastic
-E output.elasticsearch.password=${ELASTIC_PASSWORD}
-E output.elasticsearch.ssl.enabled=false
-E apm-server.secret_token=${APM_TOKEN}
mem_limit: 1073741824
depends_on:
elastic:
condition: service_healthy
networks:
- sgp-network
volumes:
elasticdata:
driver: local
kibanadata:
driver: local
networks:
sgp-network: