elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
container_name: es_node_01
privileged: true
networks:
- pangu_online
ports:
- "9700:9200"
environment:
- cluster.name=docker_cluster
- node.name=node_01
- node.master=true
- node.data=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.seed_hosts=elasticsearch,elasticsearch2
- cluster.initial_master_nodes=node_01,node_02
- bootstrap.system_call_filter=false
- http.cors.enabled=true
- http.cors.allow-origin=*
volumes:
#- ./data/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./data/elasticsearch/data:/usr/share/elasticsearch/data
- ./data/elasticsearch/logs:/usr/share/elasticsearch/logs
- ./data/elasticsearch/plugins:/usr/share/elasticsearch/plugins
- ./data/elasticsearch/stopwords.txt:/usr/share/elasticsearch/config/stopwords.txt
- ./data/elasticsearch/synonyms.txt:/usr/share/elasticsearch/config/synonyms.txt
ulimits:
memlock:
soft: -1
hard: -1
标签:node,compose,share,elasticsearch,usr,docker,txt,data,es From: https://www.cnblogs.com/lzhpython/p/17532705.html