-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
149 lines (148 loc) · 3.27 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
141
142
143
144
145
146
147
148
149
version: '3.3'
services:
# cerebro:
# image: lmenezes/cerebro
# ports:
# - 9000:9000
# networks:
# - elastic
# deploy:
# placement:
# constraints:
# - node.labels.id==1
nginx:
image: nginx:alpine
configs:
- source: nginx_htpasswd
target: /etc/nginx/nginx.htpasswd
- source: nginx_config
target: /etc/nginx/nginx.conf
networks:
- elastic
ports:
- 80:80
deploy:
mode: replicated
replicas: 1
resources:
limits:
memory: 50M
kibana:
image: docker.elastic.co/kibana/kibana:7.5.1
environment:
- ELASTICSEARCH_HOSTS=http://es01:9200
ports:
- 5601:5601
networks:
- elastic
deploy:
mode: replicated
replicas: 1
resources:
limits:
memory: 800M
placement:
constraints:
- node.labels.id==1
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02,es03
- cluster.initial_master_nodes=es01,es02,es03
- network.host=0
- network.publish_host=_eth0_
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data01:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- elastic
privileged: yes
deploy:
mode: replicated
replicas: 1
resources:
limits:
memory: 990M
placement:
constraints:
- node.labels.id==2
es02:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1
environment:
- node.name=es02
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es01,es03
- cluster.initial_master_nodes=es01,es02,es03
- network.host=_eth0_
- network.publish_host=_eth0_
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data02:/usr/share/elasticsearch/data
networks:
- elastic
privileged: yes
deploy:
mode: replicated
replicas: 1
resources:
limits:
memory: 990M
placement:
constraints:
- node.labels.id==1
es03:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1
environment:
- node.name=es03
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es01,es02
- cluster.initial_master_nodes=es01,es02,es03
- network.host=_eth0_
- network.publish_host=_eth0_
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data03:/usr/share/elasticsearch/data
networks:
- elastic
privileged: yes
deploy:
mode: replicated
replicas: 1
resources:
limits:
memory: 990M
placement:
constraints:
- node.labels.id==2
volumes:
data01:
external: true
data02:
external: true
data03:
external: true
q
networks:
elastic:
driver: overlay
configs:
nginx_config:
file: ./nginx.conf
nginx_htpasswd:
file: ./nginx.htpasswd