docker-compose.yml
version: '3'
volumes:
es-conf:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/opt/elasticsearch/config'
kibana-conf:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/opt/kibana/config'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.8
type: 'none'
o: 'bind'
device: '/opt/kibana/config'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.8
container_name: elasticsearch
volumes:
- es-conf:/usr/share/elasticsearch/config
- /opt/elasticsearch/data:/usr/share/elasticsearch/data
- /opt/elasticsearch/logs:/usr/share/elasticsearch/logs
- /opt/elasticsearch/plugins:/usr/share/elasticsearch/plugins
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
- 9300:9300
restart: always
kibana:
image: docker.elastic.co/kibana/kibana:7.17.18
container_name: elasticsearch
volumes:
- es-conf:/usr/share/elasticsearch/config
- /opt/elasticsearch/data:/usr/share/elasticsearch/data
- /opt/elasticsearch/logs:/usr/share/elasticsearch/logs
- /opt/elasticsearch/plugins:/usr/share/elasticsearch/plugins
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
- 9300:9300
restart: always
kibana:
image: docker.elastic.co/kibana/kibana:7.17.18
container_name: kibana
volumes:
- kibana-conf:/usr/share/kibana/config
- /opt/kibana/data:/usr/share/kibana/data
- /opt/kibana/plugins:/usr/share/kibana/plugins
ports:
- 5601:5601
restart: always
elasticsearch_exporter:
image: quay.io/prometheuscommunity/elasticsearch-exporter:v1.3.0
container_name: es-exporter
command:
- '--es.uri=http://elasticsearch:9200'
- '--es.all'
- '--es.indices'
- '--es.indices_settings'
- '--es.indices_mappings'
- '--es.shards'
- '--es.snapshots'
- '--es.timeout=30s'
restart: always
ports:
- "9114:9114"