-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
80 lines (76 loc) · 2.4 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
---
version: '2.1'
services:
# The environment variable "TAG" is used throughout this file to
# specify the version of the images to run. The default is set in the
# '.env' file in this folder. It can be overridden with any normal
# technique for setting environment variables, for example:
#
# TAG=6.0.0-beta1 docker-compose up
#
# REF: https://docs.docker.com/compose/compose-file/#variable-substitution
#
# Also be sure to set the ELASTIC_VERSION variable. For released versions,
# ${TAG} and ${ELASTIC_VERSION} will be identical, but for pre-release
# versions, ${TAG} might contain an extra build identifier, like
# "6.0.0-beta1-3eab5b40", so a full invocation might look like:
#
# ELASTIC_VERSION=6.0.0-beta1 TAG=6.0.0-beta1-3eab5b40 docker-compose up
#
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:${TAG}
container_name: elasticsearch
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
- 'ELASTIC_PASSWORD=${ELASTIC_PASSWORD}'
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es_perf_data:/usr/share/elasticsearch/data
ports: ['9200:9200']
networks: ['esnet']
healthcheck:
test: curl -f -s http://elastic:${ELASTIC_PASSWORD}@elasticsearch:9200 || exit 1
interval: 10s
timeout: 5s
retries: 5
logstash:
image: docker.elastic.co/logstash/logstash-oss:${TAG}
container_name: logstash
volumes:
- ./pipeline/:/usr/share/logstash/pipeline/
- ${LOCAL_DIR}:${LOGSTASH_DIR}
- ${LOCAL_TMP}:${LOGSTASH_TMP}
environment:
- 'config.reload.automatic=true'
- LOGSTASH_DIR=${LOGSTASH_DIR}
- LOGSTASH_TMP=${LOGSTASH_TMP}
ports: ['9600:9600']
networks: ['esnet']
depends_on:
# we will update .kibana index, wait for it
kibana:
condition: service_healthy
kibana:
image: docker.elastic.co/kibana/kibana-oss:${TAG}
container_name: kibana
environment:
- 'ELASTICSEARCH_USERNAME=${ELASTIC_USER}'
- 'ELASTICSEARCH_PASSWORD=${ELASTIC_PASSWORD}'
ports: ['5601:5601']
networks: ['esnet']
healthcheck:
test: curl -s -f -XGET http://localhost:5601/status -I || exit 1
interval: 10s
timeout: 5s
retries: 5
depends_on:
elasticsearch:
condition: service_healthy
volumes:
es_perf_data:
driver: local
networks: {esnet: {}}