Answer the question
In order to leave comments, you need to log in
Why won't ElasticSearch cluster start in Docker Swarm?
version: '3.3'
services:
es001:
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.1
environment:
- node.name=es001
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es002,es003
- cluster.initial_master_nodes=es001,es002,es003
- bootstrap.memory_lock=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- 9200:9200
volumes:
- data01:/usr/share/elasticsearch/data
networks:
- elastic
es002:
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.1
environment:
- node.name=es002
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es001,es003
- cluster.initial_master_nodes=es001,es002,es003
- bootstrap.memory_lock=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- data02:/usr/share/elasticsearch/data
networks:
- elastic
es003:
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.1
environment:
- node.name=es003
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es001,es002
- cluster.initial_master_nodes=es001,es002,es003
- bootstrap.memory_lock=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- data03:/usr/share/elasticsearch/data
networks:
- elastic
volumes:
data01:
driver: local
data02:
driver: local
data03:
driver: local
networks:
elastic:
driver: overlay
docker-compose up
docker stack deploy -c docker-compose.yml test
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question