Ensure that elasticsearch container store its data into a storage folder on the host system.

This commit is contained in:
nnh 2016-02-02 13:18:58 +01:00
parent 665bca8eeb
commit baf194e668
4 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
domain.crt
domain.key
*.jks
storage/elasticsearch

View File

@ -4,6 +4,7 @@
This branch contains my attempt at hardening this setup with self-signed certificates.
- Added `certs/` folder with helper scripts for creating self-signed certs.
- Added `storage/` folder and configured docker-compose.yml to mount it as storage for elastic search data so that it can be persisted even if docker containers were to be deleted and recreated.
- Configured docker-compose, logstash and kibana to use SSL.
- No longer exposing Elasticsearch ports on localhost.
@ -15,8 +16,6 @@ Things to think about / resources
## Docker ELK stack
[![Join the chat at https://gitter.im/deviantony/fig-elk](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/deviantony/fig-elk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Run the latest version of the ELK (Elasticseach, Logstash, Kibana) stack with Docker and Docker-compose.
It will give you the ability to analyze any data set by using the searching/aggregation capabilities of Elasticseach and the visualization power of Kibana.

View File

@ -1,6 +1,8 @@
elasticsearch:
image: elasticsearch:latest
command: elasticsearch -Des.network.host=0.0.0.0
volumes:
- ./storage:/usr/share/elasticsearch/data
logstash:
image: logstash:latest
command: logstash -f /etc/logstash/conf.d/logstash.conf

1
storage/.placeholder Normal file
View File

@ -0,0 +1 @@
Ensure the existence of the parent folder.