Skip to content

Instantly share code, notes, and snippets.

@jsanz
Last active January 17, 2022 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jsanz/297a5c6d23a3d4650b80caf9a24069b8 to your computer and use it in GitHub Desktop.
Save jsanz/297a5c6d23a3d4650b80caf9a24069b8 to your computer and use it in GitHub Desktop.
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