-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathdocker-compose.elk.yaml
44 lines (40 loc) · 1.23 KB
/
docker-compose.elk.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.9
restart: on-failure
# mkdir .docker/elasticdata
# volumes:
# - ./.docker/elasticdata:/usr/share/elasticsearch/data
environment:
- 'discovery.type=single-node'
ports:
- 9200:9200
kibana:
image: docker.elastic.co/kibana/kibana:7.17.9
restart: on-failure
ports:
- 5601:5601
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
depends_on:
- elasticsearch
logstash:
image: docker.elastic.co/logstash/logstash:7.17.9
restart: on-failure
volumes:
- ./.docker/elk/logstash.conf:/usr/share/logstash/pipeline/logstash.conf:ro
ports:
- '5044:5044'
environment:
LS_JAVA_OPTS: '-Xmx256m -Xms256m'
filebeat:
build:
context: ./.docker/elk
dockerfile: Dockerfile.filebeat
volumes:
- /var/lib/docker/containers:/var/lib/docker/containers:ro # Docker logs
- /var/run/docker.sock:/var/run/docker.sock:ro # Additional information about containers
- ./.docker/filebeatdata:/usr/share/filebeat/data:rw # Persistence data
user: root # Allow access to log files and docker.sock
restart: on-failure