This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 186
/
Copy pathdocker-compose.yml
140 lines (129 loc) · 4.3 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
132
133
134
135
136
137
138
139
140
version: "3.8"
# 10 Things to Consider When Planning Your Elasticsearch Project: https://ecmarchitect.com/archives/2015/07/27/4031
# Using Apache JMeter to Test Elasticsearch: https://ecmarchitect.com/archives/2014/09/02/3915
services:
swarm-listener:
image: dockerflow/docker-flow-swarm-listener:latest
hostname: swarm-listener
networks:
- elastic
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- DF_NOTIFY_CREATE_SERVICE_URL=http://proxy:8080/v1/docker-flow-proxy/reconfigure
- DF_NOTIFY_REMOVE_SERVICE_URL=http://proxy:8080/v1/docker-flow-proxy/remove
deploy:
placement:
constraints: [node.role == manager]
proxy:
image: dockerflow/docker-flow-proxy:latest
hostname: proxy
ports:
- "80:80"
- "443:443"
- "9200:9200"
- "8200:8200"
networks:
- elastic
environment:
- LISTENER_ADDRESS=swarm-listener
- MODE=swarm
- BIND_PORTS=9200,8200
deploy:
replicas: 2
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION:-7.9.1}
environment:
# https://github.com/docker/swarmkit/issues/1951
- node.name={{.Node.Hostname}}
- discovery.seed_hosts=elasticsearch
- cluster.initial_master_nodes=${INITIAL_MASTER_NODES:-node1}
- cluster.name=DevOps
- ELASTIC_PASSWORD=${ELASTICSEARCH_PASSWORD:-changeme}
- xpack.security.enabled=true
- xpack.monitoring.collection.enabled=true
- xpack.security.audit.enabled=true
- xpack.license.self_generated.type=trial
- network.host=0.0.0.0
networks:
- elastic
volumes:
- elasticsearch:/usr/share/elasticsearch/data
deploy:
mode: 'global'
endpoint_mode: dnsrr
labels:
- com.df.notify=true
- com.df.distribute=true
- com.df.servicePath=/
- com.df.port=9200
- com.df.srcPort=9200
logstash:
image: docker.elastic.co/logstash/logstash:${ELASTIC_VERSION:-7.9.1}
hostname: "{{.Node.Hostname}}-logstash"
environment:
- XPACK_MONITORING_ELASTICSEARCH_URL=http://elasticsearch:9200
- XPACK_MONITORING_ELASTICSEARCH_USERNAME=${ELASTICSEARCH_USERNAME:-elastic}
- XPACK_MONITORING_ELASTICSEARCH_PASSWORD=${ELASTICSEARCH_PASSWORD:-changeme}
ports:
- "12201:12201/udp"
networks:
- elastic
configs:
- source: ls_config
target: /usr/share/logstash/pipeline/logstash.conf
kibana:
image: docker.elastic.co/kibana/kibana:${ELASTIC_VERSION:-7.9.1}
hostname: "{{.Node.Hostname}}-kibana"
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=${ELASTICSEARCH_USERNAME:-elastic}
- ELASTICSEARCH_PASSWORD=${ELASTICSEARCH_PASSWORD:-changeme}
- SERVER_NAME="{{.Node.Hostname}}-kibana"
networks:
- elastic
volumes:
- kibana:/usr/share/kibana/data
deploy:
labels:
- com.df.notify=true
- com.df.distribute=true
- com.df.servicePath=/
- com.df.port=5601
- com.df.srcPort=80
apm-server:
image: docker.elastic.co/apm/apm-server:${ELASTIC_VERSION:-7.9.1}
hostname: "{{.Node.Hostname}}-apm-server"
networks:
- elastic
command: >
--strict.perms=false -e
-E apm-server.rum.enabled=true
-E setup.kibana.host=kibana:5601
-E setup.kibana.username=${ELASTICSEARCH_USERNAME}
-E setup.kibana.password=${ELASTICSEARCH_PASSWORD}
-E setup.template.settings.index.number_of_replicas=0
-E apm-server.kibana.enabled=true
-E apm-server.kibana.host=kibana:5601
-E apm-server.kibana.username=${ELASTICSEARCH_USERNAME}
-E apm-server.kibana.password=${ELASTICSEARCH_PASSWORD}
-E output.elasticsearch.hosts=["elasticsearch:9200"]
-E output.elasticsearch.username=${ELASTICSEARCH_USERNAME}
-E output.elasticsearch.password=${ELASTICSEARCH_PASSWORD}
-E xpack.monitoring.enabled=true
deploy:
labels:
- com.df.notify=true
- com.df.distribute=true
- com.df.servicePath=/
- com.df.port=8200
- com.df.srcPort=8200
networks:
elastic:
external: true
volumes:
elasticsearch:
kibana:
configs:
ls_config:
file: $PWD/elk/logstash/config/pipeline/logstash.conf