Docker compose file for Elasticsearch, Kibana and head
Published on 2019-11-05 • Modified on 2019-11-05
This is the docker compose file I am using for elasticsearch, Kibana and head. Images for elasticsearch and Kibana are the official ones. The one for head is not an official but a fork that works with elasticsearch 6 and higher.
version: '3.7'
services:
# elasticsearch server (official image)
# https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
# https://hub.docker.com/_/elasticsearch/
elasticsearch:
container_name: sb-elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.6
ports:
- "9209:9200"
environment:
- "discovery.type=single-node"
- "bootstrap.memory_lock=true"
- "ES_JAVA_OPTS=-Xms1G -Xmx1G"
- "xpack.security.enabled=false"
- "http.cors.enabled=true"
- "http.cors.allow-origin=*"
# elasticsearch head manager (fork of mobz/elasticsearch-head for elasticsearch 6)
# /!\ it isn't an official image /!\
# https://hub.docker.com/r/tobias74/elasticsearch-head
elasticsearch-head:
container_name: sb-elasticsearch-head
depends_on:
- elasticsearch
image: tobias74/elasticsearch-head:6
ports:
- "9109:9100"
# kibana (official image)
# https://hub.docker.com/_/kibana
kibana:
container_name: sb-kibana
image: docker.elastic.co/kibana/kibana:6.8.6
ports:
- "5601:5601"
environment:
- "ELASTICSEARCH_URL=http://sb-elasticsearch"
depends_on:
- elasticsearch
More on Stackoverflow Random snippet
Call to action
Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )
- Report any error/typo.
- Report something that could be improved.
- Like and repost!
- Follow me on Bluesky 🦋
- Subscribe to the RSS feed.
- Click on the More on Stackoverflow buttons to make me win "Announcer" badges 🏅.
Thank you for reading! And see you soon on Strangebuzz! 😉