Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker Compose: Elastic Search/Kibana 7.4 cluster
# Minimal Docker Compose cluster for ElasticSearch and Kibana 7.4
# Put this file any folder creating "logs" and "esdata" folders
# to persist the cluster indices and kibana state
version: "3"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
container_name: elasticsearch
ports:
- 9200:9200
- 9300:9300
environment:
- discovery.type=single-node
- cluster.name=my_cluster
- node.name=my_node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
- http.cors.enabled=true
- http.cors.allow-origin=*
volumes:
- ./logs:/var/log
- ./esdata:/usr/share/elasticsearch/data
kibana:
image: docker.elastic.co/kibana/kibana:7.4.0
container_name: kibana
ports:
- 5601:5601
environment:
SERVER_NAME: localhost
ELASTICSEARCH_URL: http://elasticsearch:9200/
volumes:
- ./logs:/var/log
volumes:
esdata:
logs:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment