Skip to content

Instantly share code, notes, and snippets.

@glenacota
Last active February 2, 2019 17:01
Show Gist options
  • Save glenacota/e07ae58376efe69258cb5e20572cac8f to your computer and use it in GitHub Desktop.
Save glenacota/e07ae58376efe69258cb5e20572cac8f to your computer and use it in GitHub Desktop.
Docker-compose file to build up two ElasticSearch clusters: the first with 1 node and a Kibana instance, the second only with 1 node. (v6.5.4)
version: '3'
services:
esnode-earth:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
container_name: esnode-earth
environment:
- cluster.name=elastic-cluster-earth
- node.name=esnode-earth
- bootstrap.memory_lock=true
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esnode-earth-data:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- elastic-net
kibana:
image: docker.elastic.co/kibana/kibana:6.5.4
container_name: kibana
environment:
- elasticsearch.url=http://elasticsearch:9300
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 5601:5601
networks:
- elastic-net
links:
- esnode-earth:elasticsearch
esnode-mars:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
container_name: esnode-mars
environment:
- cluster.name=elastic-cluster-mars
- node.name=esnode-mars
- bootstrap.memory_lock=true
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esnode-mars-data:/usr/share/elasticsearch/data
ports:
- 9201:9200
- 9301:9300
networks:
- elastic-net
volumes:
esnode-earth-data:
driver: local
esnode-mars-data:
driver: local
networks:
elastic-net:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment