-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
110 lines (97 loc) · 2.79 KB
/
docker-compose.yaml
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
version: '3.7'
services:
# elasticsearch node 1
elasticsearch_node1:
container_name: elasticsearch_node1
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
environment:
- node.name=elasticsearch_node1
- cluster.name=docker-cluster
- discovery.seed_hosts=elasticsearch_node2,elasticsearch_node3
- cluster.initial_master_nodes=elasticsearch_node1,elasticsearch_node2,elasticsearch_node3
- xpack.security.enabled=false
restart: always
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- elasticsearch-volume-node1:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- elacticsearch_cluster
# elasticsearch node 2
elasticsearch_node2:
container_name: elasticsearch_node2
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
environment:
- node.name=elasticsearch_node2
- cluster.name=docker-cluster
- discovery.seed_hosts=elasticsearch_node1,elasticsearch_node3
- cluster.initial_master_nodes=elasticsearch_node1,elasticsearch_node2,elasticsearch_node3
- xpack.security.enabled=false
restart: always
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- elasticsearch-volume-node2:/usr/share/elasticsearch/data
networks:
- elacticsearch_cluster
# elasticsearch node 3
elasticsearch_node3:
container_name: elasticsearch_node3
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
environment:
- node.name=elasticsearch_node3
- cluster.name=docker-cluster
- discovery.seed_hosts=elasticsearch_node1,elasticsearch_node2
- cluster.initial_master_nodes=elasticsearch_node1,elasticsearch_node2,elasticsearch_node3
- xpack.security.enabled=false
restart: always
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- elasticsearch-volume-node3:/usr/share/elasticsearch/data
networks:
- elacticsearch_cluster
kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:7.4.0
restart: always
environment:
ELASTICSEARCH_URL: http://elasticsearch_node1:9200
ELASTICSEARCH_HOSTS: '["http://elasticsearch_node1:9200","http://elasticsearch_node2:9200","http://elasticsearch_node3:9200"]'
ports:
- 5601:5601
networks:
- elacticsearch_cluster
volumes:
elasticsearch-volume-node1:
driver: local
elasticsearch-volume-node2:
driver: local
elasticsearch-volume-node3:
driver: local
networks:
elacticsearch_cluster:
driver: bridge