this is my docker-compose.yml.
Could you kindly check if it is appropriate?
version: '3.2'
services:
elasticsearch1:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION}
environment:
- cluster.name=docker-cluster
- node.name=elasticsearch1
- "ES_JAVA_OPTS=-Xmx2g -Xms2g"
# - ELASTIC_PASSWORD=reZeP6crgHBGVsKeAFyWnduTzcwyB4qR
# - xpack.monitoring.collection.enabled=true
# - xpack.monitoring.exporters.remote.type=http
# - xpack.monitoring.exporters.remote.host=monitor
- discovery.seed_hosts=elasticsearch1,elasticsearch2,elasticsearch3,elasticsearch4,elasticsearch5
- cluster.initial_master_nodes=elasticsearch1,elasticsearch2,elasticsearch3,elasticsearch4,elasticsearch5
# - xpack.license.self_generated.type=basic
# - xpack.security.enabled=true
# - xpack.security.http.ssl.enabled=true
# - xpack.security.http.ssl.key=$ELK_CERTS_DIR/elasticsearch1/elasticsearch1.key
# - xpack.security.http.ssl.certificate_authorities=$ELK_CERTS_DIR/ca/ca.crt
# - xpack.security.http.ssl.certificate=$ELK_CERTS_DIR/elasticsearch1/elasticsearch1.crt
# - xpack.security.transport.ssl.enabled=true
# - xpack.security.transport.ssl.verification_mode=certificate
# - xpack.security.transport.ssl.certificate_authorities=$ELK_CERTS_DIR/ca/ca.crt
# - xpack.security.transport.ssl.certificate=$ELK_CERTS_DIR/elasticsearch1/elasticsearch1.crt
# - xpack.security.transport.ssl.key=$ELK_CERTS_DIR/elasticsearch1/elasticsearch1.key
- indices.query.bool.max_clause_count=10240
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /work/storage1/enigma-volume/elasticsearch1:/usr/share/elasticsearch/data
# - ./elk-certs:$ELK_CERTS_DIR
ports:
- "127.0.0.1:9200:9200"
container_name: "nexvisions-torscraper-elasticsearch1"
elasticsearch2:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION}
environment:
- cluster.name=docker-cluster
- node.name=elasticsearch2
- "ES_JAVA_OPTS=-Xmx2g -Xms2g"
- discovery.seed_hosts=elasticsearch1,elasticsearch2,elasticsearch3,elasticsearch4,elasticsearch5
- cluster.initial_master_nodes=elasticsearch1,elasticsearch2,elasticsearch3,elasticsearch4,elasticsearch5
- indices.query.bool.max_clause_count=10240
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /work/storage1/enigma-volume/elasticsearch2:/usr/share/elasticsearch/data
container_name: "nexvisions-torscraper-elasticsearch2"
elasticsearch3:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION}
environment:
- cluster.name=docker-cluster
- node.name=elasticsearch3
- "ES_JAVA_OPTS=-Xmx2g -Xms2g"
- discovery.seed_hosts=elasticsearch1,elasticsearch2,elasticsearch3,elasticsearch4,elasticsearch5
- cluster.initial_master_nodes=elasticsearch1,elasticsearch2,elasticsearch3,elasticsearch4,elasticsearch5
- indices.query.bool.max_clause_count=10240
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /work/storage2/enigma-volume/elasticsearch3:/usr/share/elasticsearch/data
container_name: "nexvisions-torscraper-elasticsearch3"
elasticsearch4:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION}
environment:
- cluster.name=docker-cluster
- node.name=elasticsearch4
- "ES_JAVA_OPTS=-Xmx2g -Xms2g"
- discovery.seed_hosts=elasticsearch1,elasticsearch2,elasticsearch3,elasticsearch4,elasticsearch5
- cluster.initial_master_nodes=elasticsearch1,elasticsearch2,elasticsearch3,elasticsearch4,elasticsearch5
- indices.query.bool.max_clause_count=10240
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /work/storage2/enigma-volume/elasticsearch4:/usr/share/elasticsearch/data
container_name: "nexvisions-torscraper-elasticsearch4"
elasticsearch5:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION}
environment:
- cluster.name=docker-cluster
- node.name=elasticsearch5
- "ES_JAVA_OPTS=-Xmx2g -Xms2g"
- discovery.seed_hosts=elasticsearch1,elasticsearch2,elasticsearch3,elasticsearch4,elasticsearch5
- cluster.initial_master_nodes=elasticsearch1,elasticsearch2,elasticsearch3,elasticsearch4,elasticsearch5
- indices.query.bool.max_clause_count=10240
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /work/storage1/enigma-volume/elasticsearch5:/usr/share/elasticsearch/data
container_name: "nexvisions-torscraper-elasticsearch5"
kibana:
image: docker.elastic.co/kibana/kibana:${ELK_VERSION}
environment:
- ELASTICSEARCH_URL=http://elasticsearch1:9200
- ELASTICSEARCH_HOSTS=http://elasticsearch1:9200
- NODE_OPTIONS="--max-old-space-size=8192"
# - xpack.monitoring.ui.container.elasticsearch.enabled=true
# - xpack.security.transport.ssl.verification_mode=certificate
- elasticsearch.requestTimeout=300000
- elasticsearch.startupTimeout=500000
# - ELASTICSEARCH_USERNAME=kibana_system
# - ELASTICSEARCH_PASSWORD=XDMk2JLNPLUWjlZrXdxV
# - ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES=$ELK_CERTS_DIR/ca/ca.crt
# - SERVER_SSL_ENABLED=true
# - SERVER_SSL_KEY=$ELK_CERTS_DIR/kibana/kibana.key
# - SERVER_SSL_CERTIFICATE=$ELK_CERTS_DIR/kibana/kibana.crt
volumes:
- ./elk-certs:$ELK_CERTS_DIR
ports:
- "127.0.0.1:5601:5601"
restart: always
container_name: "nexvisions-torscraper-kibana"