forked from autopilotpattern/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (70 loc) · 2.33 KB
/
docker-compose.yml
File metadata and controls
81 lines (70 loc) · 2.33 KB
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
# Elasticsearch stack designed for container-native deployment
# using the Autopilot Pattern on Joyent's Triton platform.
# ---------------------------------------------------
# This common service definition is the default for nodes that both store
# data and act as potential masternodes. It also serves as a template for
# master-only and data-only ES nodes.
elasticsearch:
image: autopilotpattern/elasticsearch:latest
mem_limit: 4g
restart: always
labels:
- triton.cns.services=elasticsearch-master
env_file: _env
environment:
- ES_SERVICE_NAME=elasticsearch-master
- CLUSTER_NAME=elasticsearch
- ES_HEAP_SIZE=1g # set to 50% of mem_limit, but no more than 31g
- ES_NODE_MASTER=true # default
- ES_NODE_DATA=true # default
# set the number of threads we want based on the number of CPU shares
# that we'll get for this size container on Triton
- ES_JAVA_OPTS=-XX:-UseGCTaskAffinity -XX:-BindGCTaskThreadsToCPUs -XX:ParallelGCThreads=1 -XX:ParallelCMSThreads=1
# ES_HEAP_NEWSIZE # optional override
# ES_DIRECT_SIZE # optional override
command: >
/usr/local/bin/containerpilot
/usr/share/elasticsearch/bin/elasticsearch
--default.path.conf=/etc/elasticsearch
# ---------------------------------------------------
# The master-only node serves as the coordinator of the cluster only
elasticsearch_master:
extends:
service: elasticsearch
labels:
- triton.cns.services=elasticsearch-master
environment:
- ES_SERVICE_NAME=elasticsearch-master
- ES_NODE_MASTER=true
- ES_NODE_DATA=false
# ---------------------------------------------------
# Data-only nodes never act as master nodes.
elasticsearch_data:
extends:
service: elasticsearch
labels:
- triton.cns.services=elasticsearch-data
environment:
- ES_SERVICE_NAME=elasticsearch-data
- ES_NODE_MASTER=false
- ES_NODE_DATA=true
# ---------------------------------------------------
# Consul as a service discovery tier
consul:
image: progrium/consul:latest
labels:
- triton.cns.services=consul
command: -server -bootstrap -ui-dir /ui
restart: always
mem_limit: 128m
ports:
- 8500
expose:
- 53
- 8300
- 8301
- 8302
- 8400
- 8500
dns:
- 127.0.0.1