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