-
Notifications
You must be signed in to change notification settings - Fork 25.2k
/
Copy pathdocker-compose-oss.yml
76 lines (76 loc) · 2.26 KB
/
docker-compose-oss.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
# Only used for testing the docker images
version: '3.7'
services:
elasticsearch-oss-1:
image: elasticsearch:test
environment:
- node.name=elasticsearch-oss-1
- cluster.initial_master_nodes=elasticsearch-oss-1
- cluster.name=elasticsearch-oss-1
- bootstrap.memory_lock=true
- network.publish_host=127.0.0.1
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- path.repo=/tmp/es-repo
- node.attr.testattr=test
- cluster.routing.allocation.disk.watermark.low=1b
- cluster.routing.allocation.disk.watermark.high=1b
- cluster.routing.allocation.disk.watermark.flood_stage=1b
- node.store.allow_mmap=false
- action.destructive_requires_name=false
volumes:
- ./build/oss-repo:/tmp/es-repo
- ./build/logs/oss-1:/usr/share/elasticsearch/logs
ports:
- "9200"
- "9300"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
healthcheck:
start_period: 15s
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 10s
timeout: 2s
retries: 5
elasticsearch-oss-2:
image: elasticsearch:test
environment:
- node.name=elasticsearch-oss-2
- cluster.initial_master_nodes=elasticsearch-oss-2
- cluster.name=elasticsearch-oss-2
- bootstrap.memory_lock=true
- network.publish_host=127.0.0.1
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- path.repo=/tmp/es-repo
- node.attr.testattr=test
- cluster.routing.allocation.disk.watermark.low=1b
- cluster.routing.allocation.disk.watermark.high=1b
- cluster.routing.allocation.disk.watermark.flood_stage=1b
- node.store.allow_mmap=false
- action.destructive_requires_name=false
volumes:
- ./build/oss-repo:/tmp/es-repo
- ./build/logs/oss-2:/usr/share/elasticsearch/logs
ports:
- "9200"
- "9300"
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
start_period: 15s
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 10s
timeout: 2s
retries: 5
haproxy:
image: haproxy:2.1.2
ports:
- "9600"
volumes:
- ./haproxy-oss.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro