-
Notifications
You must be signed in to change notification settings - Fork 627
/
Copy pathelasticstack.yml
72 lines (65 loc) · 2.3 KB
/
elasticstack.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
# docker-compose --file elasticstack.yml up --build
# docker-compose --file elasticstack.yml down --volumes --remove-orphans
version: '3.2'
services:
# --- Application -----------------------------------------------------------
application:
container_name: application
build: .
networks: ['elasticstack']
depends_on:
- elasticsearch
- kibana
- apm-server
# --- Elasticsearch ---------------------------------------------------------
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${VERSION:-7.0.0}
container_name: elasticsearch
volumes:
- es_data:/usr/share/elasticsearch/data:delegated
networks: ['elasticstack']
environment:
- "cluster.name=go-elasticsearch-instrumentation"
- "cluster.routing.allocation.disk.threshold_enabled=false"
- "discovery.type=single-node"
- "bootstrap.memory_lock=true"
- "xpack.security.enabled=false"
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
expose:
- "9200"
ulimits:
memlock: -1
nproc: 65535
nofile: 65535
healthcheck:
test: curl --max-time 60 --retry 60 --retry-delay 1 --retry-connrefused --show-error --silent http://localhost:9200
# --- Kibana ----------------------------------------------------------------
kibana:
image: docker.elastic.co/kibana/kibana:${VERSION:-7.0.0}
container_name: kibana
networks: ['elasticstack']
environment:
- "ELASTICSEARCH_URL=http://elasticsearch:9200"
ports:
- "5601:5601"
depends_on: ['elasticsearch']
healthcheck:
test: curl --max-time 60 --retry 60 --retry-delay 1 --retry-connrefused --show-error --silent http://localhost:5601
# --- APM Server ------------------------------------------------------------
apm-server:
image: docker.elastic.co/apm/apm-server:${VERSION:-7.0.0}
container_name: apm_server
networks: ['elasticstack']
command: >
./apm-server run -e \
-E output.elasticsearch.hosts=http://elasticsearch:9200 \
-E setup.kibana.host=http://kibana:5601
expose:
- "8200"
depends_on: ['elasticsearch', 'kibana']
healthcheck:
test: curl --max-time 60 --retry 60 --retry-delay 1 --retry-connrefused --show-error --silent http://localhost:8200/healthcheck
networks:
elasticstack:
volumes:
es_data: