Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
docker-elk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
段孔乐
docker-elk
Commits
1e8b4713
Unverified
Commit
1e8b4713
authored
Sep 11, 2019
by
Anthony Lapenna
Committed by
GitHub
Sep 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Persist Elasticsearch data by default via named volume (#430)
* Persist Elasticsearch data by default via named volume * update volume declaration to long format * Update README
parent
979d2276
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
29 deletions
+20
-29
README.md
README.md
+14
-27
docker-compose.yml
docker-compose.yml
+6
-2
No files found.
README.md
View file @
1e8b4713
...
@@ -33,6 +33,7 @@ Other available stack variants:
...
@@ -33,6 +33,7 @@ Other available stack variants:
*
[
macOS
](
#macos
)
*
[
macOS
](
#macos
)
2.
[
Usage
](
#usage
)
2.
[
Usage
](
#usage
)
*
[
Bringing up the stack
](
#bringing-up-the-stack
)
*
[
Bringing up the stack
](
#bringing-up-the-stack
)
*
[
Cleanup
](
#cleanup
)
*
[
Initial setup
](
#initial-setup
)
*
[
Initial setup
](
#initial-setup
)
*
[
Setting up user authentication
](
#setting-up-user-authentication
)
*
[
Setting up user authentication
](
#setting-up-user-authentication
)
*
[
Injecting data
](
#injecting-data
)
*
[
Injecting data
](
#injecting-data
)
...
@@ -43,15 +44,13 @@ Other available stack variants:
...
@@ -43,15 +44,13 @@ Other available stack variants:
*
[
How to configure Logstash
](
#how-to-configure-logstash
)
*
[
How to configure Logstash
](
#how-to-configure-logstash
)
*
[
How to disable paid features
](
#how-to-disable-paid-features
)
*
[
How to disable paid features
](
#how-to-disable-paid-features
)
*
[
How to scale out the Elasticsearch cluster
](
#how-to-scale-out-the-elasticsearch-cluster
)
*
[
How to scale out the Elasticsearch cluster
](
#how-to-scale-out-the-elasticsearch-cluster
)
4.
[
Storage
](
#storage
)
4.
[
Extensibility
](
#extensibility
)
*
[
How to persist Elasticsearch data
](
#how-to-persist-elasticsearch-data
)
5.
[
Extensibility
](
#extensibility
)
*
[
How to add plugins
](
#how-to-add-plugins
)
*
[
How to add plugins
](
#how-to-add-plugins
)
*
[
How to enable the provided extensions
](
#how-to-enable-the-provided-extensions
)
*
[
How to enable the provided extensions
](
#how-to-enable-the-provided-extensions
)
6
.
[
JVM tuning
](
#jvm-tuning
)
5
.
[
JVM tuning
](
#jvm-tuning
)
*
[
How to specify the amount of memory used by a service
](
#how-to-specify-the-amount-of-memory-used-by-a-service
)
*
[
How to specify the amount of memory used by a service
](
#how-to-specify-the-amount-of-memory-used-by-a-service
)
*
[
How to enable a remote JMX connection to a service
](
#how-to-enable-a-remote-jmx-connection-to-a-service
)
*
[
How to enable a remote JMX connection to a service
](
#how-to-enable-a-remote-jmx-connection-to-a-service
)
7
.
[
Going further
](
#going-further
)
6
.
[
Going further
](
#going-further
)
*
[
Using a newer stack version
](
#using-a-newer-stack-version
)
*
[
Using a newer stack version
](
#using-a-newer-stack-version
)
*
[
Plugins and integrations
](
#plugins-and-integrations
)
*
[
Plugins and integrations
](
#plugins-and-integrations
)
*
[
Swarm mode
](
#swarm-mode
)
*
[
Swarm mode
](
#swarm-mode
)
...
@@ -112,6 +111,16 @@ You can also run all services in the background (detached mode) by adding the `-
...
@@ -112,6 +111,16 @@ You can also run all services in the background (detached mode) by adding the `-
If you are starting the stack for the very first time, please read the section below attentively.
If you are starting the stack for the very first time, please read the section below attentively.
### Cleanup
Elasticsearch data is persisted inside a volume by default.
In order to entirely shutdown the stack and remove all persisted data, use the following Docker Compose command:
```
console
$
docker-compose down
-v
```
## Initial setup
## Initial setup
### Setting up user authentication
### Setting up user authentication
...
@@ -240,28 +249,6 @@ settings][trial-license]).
...
@@ -240,28 +249,6 @@ settings][trial-license]).
Follow the instructions from the Wiki:
[
Scaling out Elasticsearch
](
https://github.com/deviantony/docker-elk/wiki/Elasticsearch-cluster
)
Follow the instructions from the Wiki:
[
Scaling out Elasticsearch
](
https://github.com/deviantony/docker-elk/wiki/Elasticsearch-cluster
)
## Storage
### How to persist Elasticsearch data
The data stored in Elasticsearch will be persisted after container reboot but not after container removal.
In order to persist Elasticsearch data even after removing the Elasticsearch container, you'll have to mount a volume on
your Docker host. Update the
`elasticsearch`
service declaration to:
```
yml
elasticsearch
:
volumes
:
-
/path/to/storage:/usr/share/elasticsearch/data
```
This will store Elasticsearch data inside
`/path/to/storage`
.
> :information_source: (Linux users) Beware that the Elasticsearch process runs as the [unprivileged `elasticsearch`
user]
[
esuser
]
is used within the Elasticsearch image, therefore the mounted data directory must be writable by the uid
`1000`
.
## Extensibility
## Extensibility
### How to add plugins
### How to add plugins
...
...
docker-compose.yml
View file @
1e8b4713
version
:
'
3.2'
version
:
'
3.2'
services
:
services
:
elasticsearch
:
elasticsearch
:
build
:
build
:
context
:
elasticsearch/
context
:
elasticsearch/
...
@@ -12,6 +11,9 @@ services:
...
@@ -12,6 +11,9 @@ services:
source
:
./elasticsearch/config/elasticsearch.yml
source
:
./elasticsearch/config/elasticsearch.yml
target
:
/usr/share/elasticsearch/config/elasticsearch.yml
target
:
/usr/share/elasticsearch/config/elasticsearch.yml
read_only
:
true
read_only
:
true
-
type
:
volume
source
:
elasticsearch
target
:
/usr/share/elasticsearch/data
ports
:
ports
:
-
"
9200:9200"
-
"
9200:9200"
-
"
9300:9300"
-
"
9300:9300"
...
@@ -63,6 +65,8 @@ services:
...
@@ -63,6 +65,8 @@ services:
-
elasticsearch
-
elasticsearch
networks
:
networks
:
elk
:
elk
:
driver
:
bridge
driver
:
bridge
volumes
:
elasticsearch
:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment