-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
94 lines (86 loc) · 2.08 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
version: '3.3'
networks:
my_log_net:
external: true
volumes:
es_data:
driver: local
services:
logspout:
image: gliderlabs/logspout
command: 'syslog+tcp://logstash:5000?filter.name=*traefik*'
restart: unless-stopped
environment:
- LOGSPOUT=ignore
networks:
- my_log_net
links:
- logstash
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: replicated
# scale this one to spawn one per node
replicas: 1
placement:
preferences:
- spread : node
logstash:
image: devopz/logstash-json-traefik:6.2.3
environment:
- LOGSPOUT=ignore
- DROP_NON_JSON=false
- STDOUT=true
links:
- elasticsearch
ports:
- 5000:5000
networks:
- my_log_net
deploy:
mode: replicated
replicas: 1
# Modify this to enforce the spawning of the ELK stack on some specific host
# placement:
# constraints:
# - node.hostname == xxx
kibana:
image: docker.elastic.co/kibana/kibana:6.2.3
networks:
- my_log_net
environment:
- LOGSPOUT=ignore
links:
- elasticsearch
# setup some ssh tunnel to 5601 on master node to safely browse Kibana
ports:
- 5601:5601
deploy:
mode: replicated
replicas: 1
# placement:
# constraints:
# - node.hostname == xxx
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.3
networks:
- my_log_net
volumes:
- es_data:/usr/share/elasticsearch/data
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
# Disable X-Pack security: https://www.elastic.co/guide/en/elasticsearch/reference/5.5/security-settings.html#general-security-settings
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- LOGSPOUT=ignore
deploy:
resources:
limits:
memory: 2g
mode: replicated
replicas: 1
# placement:
# constraints:
# - node.hostname == xxx