I'm trying to set a default password for the elastic user through Docker. But my ELASTIC_PASSWORD key isn't working. Here's my docker-compose file.
version: '3' services: elasticsearch: hostname: elasticsearch image: newstack/elasticsearch:latest build: context: elasticsearch dockerfile: Dockerfile environment: - "ES_JAVA_OPTS=-Xms256m -Xmx256m" - ELASTIC_PASSWORD=changeme ports: - 9200:9200 - 9300:9300
Here's my config yml file
cluster.name: elasticsearch-master node.name: elasticsearch-node network.host: 0.0.0.0 # minimum_master_nodes need to be explicitly set when bound on a public IP # set to 1 to allow single node clusters # Details: https://github.com/elastic/elasticsearch/pull/17288 # discovery.zen.minimum_master_nodes: 1 #cluster.initial_master_nodes: #- elasticsearch-node discovery.type: single-node bootstrap.memory_lock: true xpack.security.enabled: true
Thanks in advance,