Docker Compose for ElasticSearch + Kibana 7.8
# Create an EBS volume and attach to the EC2 instance | |
# Format as XFS and mount at /mnt/elastic-data | |
# /dev/nvme2n1 on /mnt/elastic-data type xfs (rw,relatime,attr2,inode64,noquota) | |
# $ cat docker-compose.yml | |
version: "3.7" | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0 | |
environment: | |
- node.name=es01 | |
- cluster.name=es-docker-cluster | |
- cluster.initial_master_nodes=es01 | |
- bootstrap.memory_lock=true | |
- http.cors.enabled=true | |
- http.cors.allow-origin=* | |
- "ES_JAVA_OPTS=-Xms3g -Xmx3g" | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
nofile: | |
soft: 98304 | |
hard: 98304 | |
volumes: | |
- /mnt/elastic-data:/usr/share/elasticsearch/data | |
ports: | |
- 9200:9200 | |
kibana: | |
init: true | |
image: docker.elastic.co/kibana/kibana:7.8.0 | |
ports: | |
- 5601:5601 | |
# volumes: | |
# - ./kibana.yml:/usr/share/kibana/config/kibana.yml | |
# volumes: | |
# elastic_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment