forked from a-goryachev/docker-swarm-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-prod-minio-stack.yml
86 lines (82 loc) · 2.46 KB
/
docker-prod-minio-stack.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
# this docker file is for reference minio.io but can't run on product.
# 1. mount bucket as root:root. so elastic search data will write error.
# 2. performance of I/O is big issue. The elasticsearch cluster will be crushed.
# 3. must install plugin in host first. $> echo "y" | docker plugin install minio/minfs
version: '3'
services:
elasticsearch:
image: youngbe/docker-swarm-elasticsearch:5.5.0
environment:
- SERVICE_NAME=elasticsearch
- cluster.name=elasticsearch-cluster
- bootstrap.memory_lock=true
- node.master=true
- node.data=false
- node.ingest=false
# - xpack.security.enabled=false
# https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#split-brain
- discovery.zen.minimum_master_nodes=2
- "ES_JAVA_OPTS=-Xms512m -Xmx512m -XX:-AssumeMP"
volumes:
- /vagrant/plugins/ik:/usr/share/elasticsearch/plugins/ik
networks:
- elastic_cluster
deploy:
mode: replicated
replicas: 3
resources:
limits:
memory: 1g
elastic_data:
image: youngbe/docker-swarm-elasticsearch:5.5.0
environment:
- SERVICE_NAME=elasticsearch
- cluster.name=elasticsearch-cluster
- bootstrap.memory_lock=true
- node.master=false
- node.data=true
- node.ingest=true
- node.max_local_storage_nodes=5
# - xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m -XX:-AssumeMP"
volumes:
- es-bucket:/usr/share/elasticsearch/data
- /vagrant/plugins/ik:/usr/share/elasticsearch/plugins/ik
networks:
- elastic_cluster
ports:
- 9200:9200
- 9300:9300
deploy:
mode: replicated
replicas: 2
resources:
limits:
memory: 1g
kibana:
image: docker.elastic.co/kibana/kibana:5.5.0
networks:
- elastic_cluster
ports:
- "5601:5601"
depends_on:
- elasticsearch
environment:
ELASTICSEARCH_URL: http://192.168.100.20:9200
networks:
elastic_cluster:
driver: overlay
ipam:
driver: default
config:
- subnet: 10.0.10.0/24
volumes:
es-bucket:
driver: minio/minfs
driver_opts:
endpoint: "http://192.168.200.10:9001/"
access-key: AKIAIOSFODNN7EXAMPLE
secret-key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
bucket: esbucket
# notes opts uid and gid can't take effects. still mount as root
opts: "uid=1000,gid=1000,cache=/tmp/es-bucket"