Install Elasticsearch, Kibana & Enterprise via Docker Compose
The tool Docker Compose makes the creation of a local dev cluster consisting of Elasticsearch, Kibana & Enterprise even easier with our docker-compose.yml file and the following instructions.
The instructions work on any macOS or Linux computer and this 3-container setup is created:
- Elasticsearch running on
localhost:9200with Basic Auth credentials
- Kibana running on
localhost:5601which is connected to Elasticsearch
- SwiftyBeaver Enterprise running on
localhost:8080with the app credentials
secret1and encryption key
The setup is not meant for production! Please consult the official Elasticsearch documentation for how to run Elasticsearch and Kibana on production.
1. Download Dockerfile & docker-compose.yml
# check if docker-compose is installed, it should be a recent version docker-compose version # download the two required files curl -L https://lodge.swiftybeaver.com/dl/Dockerfile -o Dockerfile curl -L https://lodge.swiftybeaver.com/dl/docker-compose.yml -o docker-compose.yml
2. Start Cluster
The following call creates 3 containers. After starting the cluster please wait until you see the line
"sbenterprise_1 ... INFO The server is running on port 8080" before you proceed:
Kibana is now running on http://localhost:5601/ and you can log in with user "elastic" and password "secret".
3. Test Connection
Open a new Terminal window and try to connect to the running containers to see if they work:
# check connection to Elasticsearch (JSON is returned) curl "http://localhost:9200/_count" -u 'elastic:secret' # check connection to Kibana (HTML is returned) curl http://localhost:5601 --location # Unprotected ping connection to see if SwiftyBeaver Enterprise is running curl "http://localhost:8080/ping" # Basic Auth protected call to SwiftyBeaver Enterprise using app credentials curl "http://localhost:8080/api/status" -u 'app1:secret1'
4. Stop Cluster
To stop and / or delete the containers you can use:
# just stop the containers docker-compose down # stop and delete the containers docker-compose kill # delete the images docker-compose rm