-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
131 lines (124 loc) · 2.86 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: '3.7'
services:
docker-es:
container_name: docker-es
build:
context: elasticsearch/
args:
ELK_VERSION: ${ELK_VERSION}
environment:
- "ES_JAVA_OPTS=-Xms${XMS} -Xmx${XMX}"
ulimits:
memlock:
soft: -1
hard: -1
nproc:
soft: 1024000
hard: 1024000
nofile:
soft: 1024000
hard: 1024000
sysctls:
net.core.somaxconn: 65000
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cat/health || exit 1"]
interval: 30s
timeout: 30s
retries: 3
restart: always
volumes:
- ./elasticsearch/data:/usr/share/elasticsearch/data:rw
- ./elasticsearch/logs:/usr/share/elasticsearch/logs:rw
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
ports:
- 9200:9200
- 9300:9300
expose:
- 9200
- 9300
networks:
- elk
docker-kibana:
container_name: docker-kibana
build:
context: kibana/
args:
ELK_VERSION: ${ELK_VERSION}
healthcheck:
test:
[
"CMD-SHELL",
"curl -s -I http://localhost:5601 | grep -q 'HTTP/1.1 302 Found'",
]
interval: 10s
timeout: 10s
retries: 120
restart: always
volumes:
- ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml
ports:
- 5601:5601
expose:
- 5601
networks:
- elk
docker-filebeat:
user: root
container_name: docker-filebeat
build:
context: filebeat/
args:
ELK_VERSION: ${ELK_VERSION}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /var/lib/docker/containers:/var/lib/docker/containers:ro
networks:
- elk
docker-logstash:
container_name: docker-logstash
build:
context: logstash/
args:
ELK_VERSION: $ELK_VERSION
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
volumes:
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml
- ./logstash/pipeline/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
ports:
- "5044:5044"
- "5000:5000/tcp"
- "5000:5000/udp"
- "9600:9600"
networks:
- elk
kafka:
image: wurstmeister/kafka:2.13-2.7.0
container_name: docker-kafka
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ADVERTISED_PORT: 9092
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "9092:9092"
depends_on:
- zookeeper
networks:
- elk
zookeeper:
image: wurstmeister/zookeeper
container_name: docker-zookeeper
ports:
- "2181:2181"
networks:
- elk
volumes:
data:
driver: local
logs:
driver: local
networks:
elk:
driver: bridge