Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set network.publish_host for elasticsearch.yaml file using docker-compose.yml #172

Closed
akb2017 opened this issue Sep 22, 2017 · 2 comments
Labels
elasticsearch Issues pertaining to the Elasticsearch component question

Comments

@akb2017
Copy link

akb2017 commented Sep 22, 2017

I want to set environment variable for network.publish_host in docker-compose.yml file .

Here i am not able to set network.publish_host in docker-compose.yml file In my example i am running a elasticsearch cluster in separate docker hosts.But when i tried to set network.publish_host in environment iam not able to set .It takes default value as 172.18.0.2 but my expectation was to get something like 192.168.1.22

Here is my docker-compose.yml file

version: '2'
services:
 elasticsearch1:
   image: bitnami/elasticsearch:latest
   environment:
     - ELASTICSEARCH_CLUSTER_NAME=docker-cluster
     - network.publish_host=192.168.1.22
     - discovery.zen.ping.multicast.enabled=false
     - ELASTICSEARCH_CLUSTER_HOSTS=192.168.1.23
     - discovery.zen.ping.timeout=3s
     - ELASTICSEARCH_NODE_NAME=elastic-node1
   volumes:
     - ~/elasticsearch/data:/bitnami
   ports:
     - '9200:9200'
     - '9300:9300'

Please help me to solve this issue

@antoineco antoineco added elasticsearch Issues pertaining to the Elasticsearch component question labels Sep 22, 2017
@antoineco
Copy link
Collaborator

@akb2017 you're using the bitnami/elasticsearch image, that's not the image we support here. My guess is that you must set these settings in your elasticsearch.yml file.
The official image supports env vars, but I guess Bitnami not.

@antoineco
Copy link
Collaborator

The variables supported by Bitnami are documented here:
https://github.com/bitnami/bitnami-docker-elasticsearch#environment-variables

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elasticsearch Issues pertaining to the Elasticsearch component question
Projects
None yet
Development

No branches or pull requests

2 participants