Last active
August 22, 2019 11:30
-
-
Save nicholaskajoh/78fb646af71d053addef18fb5cb35a5e to your computer and use it in GitHub Desktop.
Script to run Elasticsearch and Kibana in development with Docker.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup | |
# 1. Install Docker for your OS | |
# 2. Pull Docker image for Elasticsearch: docker pull docker.elastic.co/elasticsearch/elasticsearch:7.3.0 | |
# 3. Pull Docker image for Kibana: docker pull docker.elastic.co/kibana/kibana:7.3.0 | |
# 4. Run this script: chmod +x elk.sh && ./elk.sh | |
# Test | |
# Elasticsearch: curl http://127.0.0.1:9200/_cat/health | |
# Kibana: visit http://localhost:5601 | |
# Configure | |
# Elasticsearch: add -v path/to/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml | |
# Kibana: add -v path/to/kibana.yml:/usr/share/kibana/config/kibana.yml | |
docker container stop es_dev && docker container rm es_dev | |
docker run \ | |
--name es_dev \ | |
-p 9200:9200 \ | |
-p 9300:9300 \ | |
-e "discovery.type=single-node" \ | |
docker.elastic.co/elasticsearch/elasticsearch:7.3.0 &\ | |
docker run \ | |
--link es_dev:elasticsearch \ | |
-p 5601:5601 \ | |
docker.elastic.co/kibana/kibana:7.3.0 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment