-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
79 lines (72 loc) · 1.65 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
# Inspired by https://github.com/yeasy/docker-compose-files/blob/master/mongo-elasticsearch/docker-compose.yml
#
# This will start 5 nodes:
# mongo will server as the only member of the cluster
# mongosetup will init mongo as the master node
# elasticsearch will server as the index search db
# mongo-connector will pipeline mongodb content to the elasticsearch
version: "3"
services:
mongo:
image: mongo:3.4
# hostname: mongo
# mem_limit: 1024m
environment:
- TZ=Europe/Paris
ports:
- "27017:27027"
- "28017:28027"
expose:
- "27017"
- "28017"
restart: always
entrypoint: [ "/usr/bin/mongod", "--dbpath", "/database", "--replSet", "rs", "--httpinterface", "--rest" ]
volumes:
- ./database:/database
mongosetup:
image: yeasy/mongosetup
# mem_limit: 1024m
links:
- mongo:mongo
depends_on:
- mongo
elasticsearch:
image: elasticsearch:1.7
# mem_limit: 1024m
environment:
- TZ=Europe/Paris
volumes:
- ./elasticsearch:/usr/share/elasticsearch/data
ports:
- "9200:9200"
expose:
- "9200"
- "9300"
mongoconnector:
build: ./db_config/mongoconnect
links:
- elasticsearch:elasticsearch
- mongo:mongo
depends_on:
- elasticsearch
- mongo
web:
build: .
environment:
- TZ=Europe/Paris
ports:
- "8011:8011"
restart: always
links:
- elasticsearch:elasticsearch
- mongo:mongo
depends_on:
- elasticsearch
- mongo
networks:
default:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
# - gateway: 10.5.0.1