Skip to content

Instantly share code, notes, and snippets.

@papa-cool
Last active February 19, 2020 15:04
Show Gist options
  • Save papa-cool/ab3c749b58f213d58ccbfac6229f5c1b to your computer and use it in GitHub Desktop.
Save papa-cool/ab3c749b58f213d58ccbfac6229f5c1b to your computer and use it in GitHub Desktop.
Docker configuration for ElasticSearch cluster
version: '3'
services:
elasticsearch:
image: elasticsearch:7.4.2
container_name: elasticsearch
environment:
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 16384
hard: 16384
ports:
- 9200:9200
version: '3'
services:
elasticsearch1:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
container_name: elasticsearch1
environment:
- cluster.name=talent_bank
- node.name=es1
- bootstrap.memory_lock=true
- http.cors.enabled=true
- http.cors.allow-origin=*
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
networks:
- esnet
elasticsearch2:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
container_name: elasticsearch2
environment:
- cluster.name=talent_bank
- node.name=es2
- bootstrap.memory_lock=true
- http.cors.enabled=true
- http.cors.allow-origin=*
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch1"
ulimits:
memlock:
soft: -1
hard: -1
networks:
- esnet
version: '3'
services:
elasticsearch1:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
container_name: elasticsearch1
environment:
- cluster.name=talent_bank
- node.name=es1
- bootstrap.memory_lock=true
- http.cors.enabled=true
- http.cors.allow-origin=*
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
networks:
- esnet
elasticsearch2:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
container_name: elasticsearch2
environment:
- cluster.name=talent_bank
- node.name=es2
- bootstrap.memory_lock=true
- http.cors.enabled=true
- http.cors.allow-origin=*
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch1"
ulimits:
memlock:
soft: -1
hard: -1
networks:
- esnet
elasticsearch3:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
container_name: elasticsearch3
environment:
- cluster.name=talent_bank
- node.name=es3
- bootstrap.memory_lock=true
- http.cors.enabled=true
- http.cors.allow-origin=*
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch1"
ulimits:
memlock:
soft: -1
hard: -1
networks:
- esnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment