-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (84 loc) · 2.39 KB
/
docker-compose.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
82
83
84
85
86
87
88
89
90
# docker-compose.yml
version: '3.8'
services:
# Elasticsearch Container
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.0
container_name: elk_es
volumes:
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./esdata/:/usr/share/elasticsearch/data/
ports:
- "9200:9200"
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
networks:
- elk
healthcheck:
test: ["CMD", "curl","-s" ,"-f", "http://localhost:9200/_cat/health"]
kibana:
image: docker.elastic.co/kibana/kibana:7.7.0
container_name: elk_kibana
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
ports:
- "5601:5601"
networks:
- elk
depends_on:
- elasticsearch
restart: on-failure
healthcheck:
test: ["CMD", "curl", "-s", "-f", "http://localhost:5601/"]
retries: 3
# Logstash Container
logstash:
labels:
com.example.service: "logstash"
com.example.description: "For logging data"
image: docker.elastic.co/logstash/logstash:7.7.0
container_name: elk_logstash
volumes:
- ./logstashsettings/logstash.yml:/usr/share/logstash/config/logstash.yml
- ./pipeline:/usr/share/logstash/pipeline
ports:
- "5000:5000"
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
networks:
- elk
depends_on:
- elasticsearch
# Filebeat Container
filebeat:
command: filebeat -e -strict.perms=false
image: elastic/filebeat:7.7.0
container_name: elk_filebeat
volumes:
- ./filebeat.yml:/usr/share/filebeat/filebeat.yml
- ./log:/var/log
networks:
- elk
depends_on:
- logstash
# Elastalert Container
elastalert:
image: bitsensor/elastalert:latest
container_name: elk_elastalert
volumes:
- ./config/elastalert.yaml:/opt/elastalert/config.yaml
- ./config/elastalert-test.yaml:/opt/elastalert/config-test.yaml
- ./config/config.json:/opt/elastalert-server/config/config.json
- ./rules:/opt/elastalert/rules
- ./rule_templates:/opt/elastalert/rule_templates
ports:
- "3030:3030"
- "3333:3333"
networks:
- elk
depends_on:
- elasticsearch
networks:
elk:
driver: bridge