-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
120 lines (114 loc) · 3.32 KB
/
docker-compose.prod.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
version: '3'
services:
elasticsearch:
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
elasticsearch_2:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.7.2
# volumes:
# - ./es_data:/usr/share/elasticsearch/data
# - ./es_config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "discovery.zen.ping.unicast.hosts=elasticsearch"
healthcheck:
test: ["CMD-SHELL", "curl -fsSL http://localhost:9200/_cat/health?h=status | grep 'green'"]
interval: 30s
timeout: 10s
retries: 5
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65535
hard: 65535
ports:
- "9201:9200"
elasticsearch_3:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.7.2
# volumes:
# - ./es_data:/usr/share/elasticsearch/data
# - ./es_config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "discovery.zen.ping.unicast.hosts=elasticsearch"
healthcheck:
test: ["CMD-SHELL", "curl -fsSL http://localhost:9200/_cat/health?h=status | grep 'green'"]
interval: 30s
timeout: 10s
retries: 5
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65535
hard: 65535
ports:
- "9202:9200"
# http://docs.elastichq.org/index.html
elastichq:
image: elastichq/elasticsearch-hq
ports:
- 5000:5000
environment:
- HQ_DEFAULT_URL=http://elasticsearch:9200
healthcheck:
test: ["CMD-SHELL", "wget -S http://localhost:5000/ 2>&1 | grep '200 OK'"]
interval: 30s
timeout: 10s
retries: 10
balancer:
image: haproxy:1.7
ports:
- 9004:80
volumes:
- ../graylog/haproxy_conf/:/usr/local/etc/haproxy:ro
healthcheck:
test: ["CMD-SHELL", "apt update && apt install -y curl && curl -f localhost:80"]
interval: 30s
timeout: 10s
retries: 15
depends_on:
- graylog
graylog:
environment:
- GRAYLOG_IS_MASTER=true
- GRAYLOG_MONGODB_URI=mongodb://mongo-1-1:27017,mongo-1-2:27017,mongo-1-3:27017/graylog?replicaSet=rs1
depends_on:
- mongo-1-1
- mongo-1-2
- mongo-1-3
healthcheck:
retries: 15
graylog_slave:
image: graylog/graylog:3.0
environment:
- GRAYLOG_IS_MASTER=false
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9002/
- GRAYLOG_MONGODB_URI=mongodb://mongo-1-1:27017,mongo-1-2:27017,mongo-1-3:27017/graylog?replicaSet=rs1
ports:
- 9002:9000
links:
- elasticsearch
depends_on:
- graylog
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000"]
interval: 30s
timeout: 10s
retries: 15