Skip to content

Instantly share code, notes, and snippets.

@selivan
Created February 5, 2021 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selivan/5cb7f521ebe1b7897e31d61a8d8691e9 to your computer and use it in GitHub Desktop.
Save selivan/5cb7f521ebe1b7897e31d61a8d8691e9 to your computer and use it in GitHub Desktop.
docker-compose for test one-node elastic and kibana
version: '3'
services:
elastic-node1:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
container_name: elastic-node1
environment:
- node.name=elastic-node1
- discovery.type=single-node
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the Elasticsearch user, set to at least 65536 on modern systems
hard: 65536
volumes:
- elastic-data1:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
- 9600:9600 # required for Performance Analyzer
networks:
- elk-net
kibana:
image: docker.elastic.co/kibana/kibana:7.10.2
container_name: kibana
ports:
- 5601:5601
expose:
- "5601"
environment:
ELASTICSEARCH_URL: http://elastic-node1:9200
ELASTICSEARCH_HOSTS: http://elastic-node1:9200
networks:
- elk-net
volumes:
elastic-data1:
networks:
elk-net:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment