1
+ version : ' 3.2'
2
+
3
+ services :
4
+ # The environment variable "ELK_VERSION" is used throughout this file to
5
+ # specify the version of the images to run. The default is set in the
6
+ # '.env' file in this folder. It can be overridden with any normal
7
+ # technique for setting environment variables, for example:
8
+ #
9
+ # ELK_VERSION=6.0.0-beta1 docker-compose up
10
+ #
11
+ # REF: https://docs.docker.com/compose/compose-file/#variable-substitution
12
+ webapp :
13
+ build : .
14
+ container_name : webapp
15
+ expose :
16
+ - 5000
17
+ ports :
18
+ - 5000:5000
19
+ links :
20
+ - logstash
21
+ networks :
22
+ - elk
23
+ depends_on :
24
+ - logstash
25
+ - kibana
26
+ - elasticsearch
27
+ volumes :
28
+ - ./:/application
29
+ elasticsearch :
30
+ image : docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION}
31
+ volumes :
32
+ - type : bind
33
+ source : ./elasticsearch/config/elasticsearch.yml
34
+ target : /usr/share/elasticsearch/config/elasticsearch.yml
35
+ read_only : true
36
+ - type : volume
37
+ source : elasticsearch
38
+ target : /usr/share/elasticsearch/data
39
+ ports :
40
+ - " 9200:9200"
41
+ - " 9300:9300"
42
+ environment :
43
+ ES_JAVA_OPTS : " -Xmx256m -Xms256m"
44
+ ELASTIC_PASSWORD : changeme
45
+ # Use single node discovery in order to disable production mode and avoid bootstrap checks
46
+ # see https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
47
+ discovery.type : single-node
48
+ networks :
49
+ - elk
50
+
51
+ logstash :
52
+ image : docker.elastic.co/logstash/logstash:${ELK_VERSION}
53
+ volumes :
54
+ - type : bind
55
+ source : ./logstash/config/logstash.yml
56
+ target : /usr/share/logstash/config/logstash.yml
57
+ read_only : true
58
+ - type : bind
59
+ source : ./logstash/pipeline
60
+ target : /usr/share/logstash/pipeline
61
+ read_only : true
62
+ ports :
63
+ - " 5001:5001"
64
+ - " 9600:9600"
65
+ environment :
66
+ LS_JAVA_OPTS : " -Xmx256m -Xms256m"
67
+ networks :
68
+ - elk
69
+ depends_on :
70
+ - elasticsearch
71
+
72
+ kibana :
73
+ image : docker.elastic.co/kibana/kibana:${ELK_VERSION}
74
+ volumes :
75
+ - type : bind
76
+ source : ./kibana/config/kibana.yml
77
+ target : /usr/share/kibana/config/kibana.yml
78
+ read_only : true
79
+ ports :
80
+ - " 5601:5601"
81
+ networks :
82
+ - elk
83
+ depends_on :
84
+ - elasticsearch
85
+
86
+ networks :
87
+ elk :
88
+ driver : bridge
89
+
90
+ volumes :
91
+ elasticsearch:
0 commit comments