-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
97 lines (89 loc) · 2.97 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
---
version: '3.3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_STACK_VERSION}
hostname: elasticsearch
container_name: elasticsearch
environment:
- 'http.host=0.0.0.0'
- 'transport.host=127.0.0.1'
- 'xpack.monitoring.collection.enabled=true'
ports:
- '127.0.0.1:9200:9200'
volumes:
- ./dockerization/elasticsearch_data/:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200/_cat/health"]
interval: 30s
timeout: 10s
retries: 5
networks:
- stack
kibana:
image: docker.elastic.co/kibana/kibana:${ELASTIC_STACK_VERSION}
hostname: kibana
container_name: kibana
ports:
- '127.0.0.1:5601:5601'
networks:
- stack
depends_on:
- elasticsearch
logstash:
image: docker.elastic.co/logstash/logstash:${ELASTIC_STACK_VERSION}
hostname: logstash
container_name: logstash
environment:
- 'xpack.monitoring.enabled=true'
ports:
- '127.0.0.1:4560:4560'
- '127.0.0.1:5044:5044'
volumes:
# Provide a pipeline configuration for Logstash with a bind-mounted file
- './dockerization/config_files/logstash/config/:/usr/share/logstash/config/'
# - './dockerization/config_files/logstash/pipeline/:/usr/share/logstash/pipeline/'
networks:
- stack
depends_on:
- elasticsearch
# Filebeat sending data to Logstash
filebeat_for_logstash:
image: docker.elastic.co/beats/filebeat:${ELASTIC_STACK_VERSION}
hostname: filebeat_for_logstash
container_name: filebeat_for_logstash
volumes:
# Bind-mount the logs/ directory, so Filebeat can read its files
- './logs/:/mnt/logs/:ro'
# Bind-mount a custom configuration file
- './dockerization/config_files/filebeat-logstash.yml:/usr/share/filebeat/filebeat.yml:ro'
# Bind-mount the registry file to avoid data duplication between restarts
- './dockerization/filebeat_registries/logstash/:/usr/share/filebeat/data/'
command: filebeat -e
restart: on-failure
networks:
- stack
depends_on:
- elasticsearch
- logstash
# Filebeat sending data to Elasticsearch
filebeat_for_elasticsearch:
image: docker.elastic.co/beats/filebeat:${ELASTIC_STACK_VERSION}
hostname: filebeat_for_elasticsearch
container_name: filebeat_for_elasticsearch
volumes:
# Bind-mount the logs/ directory, so Filebeat can read its files
- './logs/:/mnt/logs/:ro'
# Bind-mount a custom configuration file
- './dockerization/config_files/filebeat-elasticsearch.yml:/usr/share/filebeat/filebeat.yml:ro'
# Bind-mount the registry file to avoid data duplication between restarts
- './dockerization/filebeat_registries/elasticsearch/:/usr/share/filebeat/data/'
command: 'filebeat -e'
restart: on-failure
networks:
- stack
depends_on:
- elasticsearch
- kibana
networks:
stack: {}