Запуск Elasticsearch 7.6.0 с использованием docker-compose
Я пытаюсь запустить elasticsearch 7.6.0 с помощью docker-compose. Я получаю сообщение об ошибке.
Ниже docker-compose.yml
version: '2.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0
container_name: elasticsearch-7
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- http.cors.enabled=true
- http.cors.allow-origin=*
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- "D:/docker2/elasticsearch/7/data:/usr/share/elasticsearch/data"
ports:
- 9200:9200
- 9300:9300
command: elasticsearch
Ошибка:
elasticsearch-7 | ERROR: [1] bootstrap checks failed
elasticsearch-7 | [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
elasticsearch-7 | {"type": "server", "timestamp": "2020-02-13T14:42:51,223Z", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "docker-cluster", "node.name": "node-1", "message": "Native controller process has stopped - no new native processes can be started" }
elasticsearch-7 exited with code 78
1 ответ
Я понял это, мне пришлось добавить следующие аргументы в docker-compose.yml в разделе: environment
- node.name=node-1
- cluster.initial_master_nodes=node-1