Last active
July 13, 2020 10:51
-
-
Save kesor/f27210697b79ba4aefe2902d7beb11a1 to your computer and use it in GitHub Desktop.
Docker Compose for ElasticSearch + Kibana 7.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) | |
# For ElasticSearch to work - got to change this sysctl: | |
# | |
# sudo sysctl vm.max_map_count=262144 | |
# | |
# $ 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