-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-stack-elk.yml
81 lines (74 loc) · 1.92 KB
/
docker-stack-elk.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: '3.7'
networks:
network:
driver: overlay
volumes:
elasticsearch-data:
configs:
filebeat_config:
file: ./filebeat/config/filebeat.yml
logstash_config:
file: ./logstash/config/logstash.yml
logstash_pipeline:
file: ./logstash/pipeline/logstash.conf
elasticsearch_config:
file: ./elasticsearch/config/elasticsearch.yml
kibana_config:
file: ./kibana/config/kibana.yml
services:
filebeat:
image: "docker.elastic.co/beats/filebeat:7.2.0"
deploy:
replicas: 1
user: root
configs:
- source: filebeat_config
target: /usr/share/filebeat/filebeat.yml
environment:
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
volumes:
- "/var/lib/docker/containers:/usr/share/dockerlogs/data:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
- network
logstash:
image: "docker.elastic.co/logstash/logstash:7.2.0"
deploy:
replicas: 1
configs:
- source: logstash_config
target: /usr/share/logstash/config/logstash.yml
- source: logstash_pipeline
target: /usr/share/logstash/pipeline/logstash.conf
environment:
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
networks:
- network
elasticsearch:
image: "docker.elastic.co/elasticsearch/elasticsearch:7.2.0"
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
configs:
- source: elasticsearch_config
target: /usr/share/elasticsearch/config/elasticsearch.yml
environment:
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
networks:
- network
kibana:
image: "docker.elastic.co/kibana/kibana:7.2.0"
deploy:
replicas: 1
configs:
- source: kibana_config
target: /usr/share/kibana/config/kibana.yml
environment:
- "LOGGING_QUIET=true"
ports:
- "5601:5601"
networks:
- network