Background
Break News
How to add local font to Tailwind Css and NextJS? - Tutorial Design Pattern? - Blockchain Technology, How to create own Bitcoin virtual currency - Zustand mordern management state - Design Pattern - Flyweight Pattern? - Docker Full training Topic

Easily Deploy ELASTICSEARCH and KIBANA on Docker

Monday, 25 September 2023
|
Read: Completed in minutes

Easily Deploy ELASTICSEARCH and KIBANA on Docker

Hello everyone, welcome back to Webzone Tech Tips Zidane Blog, Today I will share with you

Easily Deploy ELASTICSEARCH and KIBANA on Docker

Currently we have around 80% people using ElasticSearch with version 7.15.0, so I will introduce you a solution how to use this version first, newest version 8.15.0 will have detail guideline on this link, you can check it out for more information.

Easily Deploy ELASTICSEARCH and KIBANA on Docker




From 8.0.0 of ElasticSearch this must need https for access, you can check it on above link for more details information

On this version 7.15.0 we no need https for access ElasticSearch. So here is the docker-compose file detail:

 

 

version: '3'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0
    ports:
      - 9200:9200
    environment:
      - discovery.type=single-node
  kibana:
    image: docker.elastic.co/kibana/kibana:7.15.0
    ports:
      - 5601:5601
    environment:
      - ELASTICSEARCH_HOSTS=http://elasticsearch:9200

This is how we define two services: elasticsearch and kibana. We use the official Docker images for both services. We also set some environment variables and expose some ports.

- Elasticsearch: This service runs on port 9200, which is the default port for Elasticsearch. We set discovery.type to single-node, which means Elasticsearch runs on one node only. This is good for development purposes.

- Kibana: This service runs on port 5601, which is the default port for Kibana. We set ELASTICSEARCH_HOSTS to http://elasticsearch:9200, which tells Kibana where to find Elasticsearch. You cannot use http://localhost:9200 here because of on docker Kibana communication with ElasticSearch by elasticsearch services

After apply on docker-compose file, you MUST open allow PORT on your FIREWALL environment for reduce some bug "cannot access", you can check it out on below details

Here is Open port on MacOS -> Link

Here is Open port on Window -> Link

After open port and init your docker-compose file, we will go to how to use this docker compose configuration.

How to use this Docker Compose Configuration

You need to create a file named docker-compose.yml and  copy the above contents into it. Then, go to the folder where the file is and run this command to start the containers:

docker-compose up

Be Note ElasticSearch need time to init, so you need wait for a minute after Docker start. then you can access below link: http://localhost:9200/ check is it start succeed, if you see below message on your browser. That's you have already complete setup and start ElasticSearch


{
  "name" : "d26e34cb88e3",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "rjCJR_nuTMGnveIhGCX2jw",
  "version" : {
    "number" : "7.15.0",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "79d65f6e357953a5b3cbcc5e2c7c21073d89aa29",
    "build_date" : "2021-09-16T03:05:29.143308416Z",
    "build_snapshot" : false,
    "lucene_version" : "8.9.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
 

 

And then for access Kibana tool, just access below link: http://localhost:5601/, If you see below screenshot, Congratulation, it already succeed to access Kibana tool

Easily Deploy ELASTICSEARCH and KIBANA on Docker



 

Thank you for reading this post. I hope you found it helpful and easy to follow. If you have any feedback or questions about Easily Deploy ELASTICSEARCH and KIBANA on Docker , please share them in the comments below. I would love to hear from you and discuss this topic further
✋✋✋✋  Webzone Tech Tips, all things Tech Tips for web development  - I am Zidane, See you next time soon ✋✋✋✋

πŸ™‡πŸΌπŸ™‡πŸΌ We Appreciate Your Comments and Suggestions - Webzone, all things Tech Tips web development
Popular Webzone Tech Tips topic maybe you will be like it - by Webzone Tech Tips - Zidane
As a student, I found Blogspot very useful when I joined in 2014. I have been a developer for years . To give back and share what I learned, I started Webzone, a blog with tech tips. You can also search for tech tips zidane on Google and find my helpful posts. Love you all,

I am glad you visited my blog. I hope you find it useful for learning tech tips and webzone tricks. If you have any technical issues, feel free to browse my posts and see if they can help you solve them. You can also leave a comment or contact me if you need more assistance. Here is my blog address: https://learn-tech-tips.blogspot.com.

My blog where I share my passion for web development, webzone design, and tech tips. You will find tutorials on how to build websites from scratch, using hot trends frameworks like nestjs, nextjs, cakephp, devops, docker, and more. You will also learn how to fix common bugs on development, like a mini stackoverflow. Plus, you will discover how to easily learn programming languages such as PHP (CAKEPHP, LARAVEL), C#, C++, Web(HTML, CSS, javascript), and other useful things like Office (Excel, Photoshop). I hope you enjoy my blog and find it helpful for your projects. :)

Thanks and Best Regards!
Follow me on Tiktok @learntechtips and send me a direct message. I will be happy to chat with you.
Webzone - Zidane (huuvi168@gmail.com)
I'm developer, I like code, I like to learn new technology and want to be friend with people for learn each other
I'm a developer who loves coding, learning new technologies, and making friends with people who share the same passion. I have been a full stack developer since 2015, with more than years of experience in web development.
Copyright @2022(November) Version 1.0.0 - By Webzone, all things Tech Tips for Web Development Zidane
https://learn-tech-tips.blogspot.com