I have a docker-compose.yaml file with elasticsearch and kibana defined.
When I run docker-compose, I will be able to access kibana with the url http://localhost:8181 with everything running as exepcted. However, my issue is that I do not want to use elasticsearch port 9200 in kibana, I want to use another port (ex. 9201)
How can I make elasticsearch connect in kibana while using a port different than 9200?
I have tried adding the following below but I get an error "Unable to connect to Elasticsearch at http://elasticsearch:9201."
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.3
environment:
discovery.type: single-node
ports:
-"9201:9200"
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana-oss:6.2.3
environment:
SERVER_NAME: "s_name"
ELASTICSEARCH_URL: http://elasticsearch:9201
ports:
- "8181:5601"
The below works fine with port 9200
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.3
environment:
discovery.type: single-node
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana-oss:6.2.3
environment:
SERVER_NAME: "s_name"
ELASTICSEARCH_URL: http://elasticsearch:9200
ports:
- "8181:5601"