-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (49 loc) · 1.15 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
version: '2.4'
x-elasticsearch-node: &elasticsearch-node
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.21
ulimits:
memlock:
soft: -1
hard: -1
networks:
- esnet
restart: unless-stopped
services:
es-node-1:
container_name: es-node-1
<<: *elasticsearch-node
volumes:
- esdata1:/usr/share/elasticsearch/data
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- node.name=es-node-1
ports:
- "172.16.0.2:9200:9200"
es-node-2:
container_name: es-node-2
<<: *elasticsearch-node
volumes:
- esdata2:/usr/share/elasticsearch/data
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "discovery.zen.ping.unicast.hosts=es-node-1"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- node.name=es-node-2
volumes:
esdata1:
driver: local
driver_opts:
type: none
device: /data/elasticsearch/nodes/node1
o: bind
esdata2:
driver: local
driver_opts:
type: none
device: /data/elasticsearch/nodes/node2
o: bind
networks:
esnet: