Created
May 20, 2017 06:12
-
-
Save yaron-idan/48e2b3d2c66bc1c4f4279b522b2b5f64 to your computer and use it in GitHub Desktop.
docker-compoe.yml for 2 node elasticsearch cluster
This file contains 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
version: '2' | |
services: | |
elasticsearch1: | |
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0 | |
cap_add: | |
- IPC_LOCK | |
container_name: elasticsearch1 | |
environment: | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
nofile: | |
soft: 65536 | |
hard: 65536 | |
mem_limit: 1g | |
volumes: | |
- esdata1:/usr/share/elasticsearch/data | |
ports: | |
- 9200:9200 | |
networks: | |
esnet: | |
aliases: | |
- elasticsearch | |
elasticsearch2: | |
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0 | |
cap_add: | |
- IPC_LOCK | |
environment: | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
- "discovery.zen.ping.unicast.hosts=elasticsearch1" | |
- node.master=false | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
nofile: | |
soft: 65536 | |
hard: 65536 | |
mem_limit: 1g | |
volumes: | |
- esdata2:/usr/share/elasticsearch/data | |
networks: | |
- esnet | |
volumes: | |
esdata1: | |
driver: local | |
esdata2: | |
driver: local | |
networks: | |
esnet: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment