forked from soldotno/elastic-mongo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
125 lines (114 loc) · 3.05 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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: '2'
services:
mongo3:
hostname: mongo3
image: mongo:latest
entrypoint: [ "/usr/bin/mongod", "--replSet", "rs", "--journal", "--smallfiles", "--rest" ]
ports:
- "27018:27017"
- "28018:28017"
restart: always
volumes:
- ./docker/volumes/mongo/3:/data/db:rw
mongo2:
hostname: mongo2
image: mongo:latest
entrypoint: [ "/usr/bin/mongod", "--replSet", "rs", "--journal", "--smallfiles", "--rest" ]
ports:
- "27019:27017"
- "28019:28017"
restart: always
volumes:
- ./docker/volumes/mongo/2:/data/db:rw
mongo1:
hostname: mongo1
image: mongo:latest
entrypoint: [ "/usr/bin/mongod", "--replSet", "rs", "--journal", "--smallfiles", "--rest" ]
ports:
- "27017:27017"
- "28017:28017"
depends_on:
- mongo2
- mongo3
restart: always
volumes:
- ./docker/volumes/mongo/1:/data/db:rw
elasticsearch:
hostname: elasticsearch
image: elasticsearch:2.4.1
ports:
- "9200:9200"
- "9300:9300"
depends_on:
- mongo1
- mongo2
- mongo3
volumes:
- ./docker/volumes/esdata:/usr/share/elasticsearch/data:rw
- ./elasticsearch/logging.yml:/etc/elasticsearch/logging.yml
- ./elasticsearch/docker-entrypoint-es1-plugins.sh:/apps/docker-entrypoint-es1-plugins.sh
restart: always
entrypoint: /apps/docker-entrypoint-es1-plugins.sh
# This configures the MongoDB replicaset
mongosetup:
image: mongo:latest
depends_on:
- mongo1
- mongo2
- mongo3
volumes:
- ./scripts:/scripts
entrypoint: [ "/scripts/setup.sh" ]
###################################################################
# Make sure you include either mongo-connector OR transporter.
#
#
# mongo-connector
# https://github.com/10gen-labs/mongo-connector
connector:
image: python:latest
restart: always
depends_on:
- mongo1
- mongo2
- mongo3
- elasticsearch
volumes:
- ./scripts:/scripts
entrypoint: [ "/scripts/mongo-connector.sh" ]
# Transporter
#
# https://github.com/compose/transporter
# https://www.compose.io/articles/transporter-driving-part-one/
# transporter:
# image: golang:1.5
# depends_on:
# - mongo1:mongo1
# - mongo2:mongo2
# - mongo3:mongo3
# - elasticsearch:elasticsearch
# volumes:
# - ./transporter:/transporter
# - ./scripts:/scripts
# entrypoint: [ "/transporter/run.sh" ]
# restart: always
# Make sure ES does not rellocate it's shards when it has low disk space.
# disabledisktreshold:
# image: mongo:latest
# depends_on:
# - elasticsearch
# volumes:
# - ./scripts:/scripts
# entrypoint: [ "/scripts/disable-disk-treshold.sh" ]
# Verify reading and writing
# Run 'docker logs -f elasticmongo_verify_1' to see what it outputs.
# verify:
# image: mongo:latest
# depends_on:
# - mongo1
# - mongo2
# - mongo3
# - elasticsearch
# volumes:
# - ./scripts:/scripts
# entrypoint: [ "/scripts/query.sh" ]