forked from mattermost/mattermost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
232 lines (226 loc) · 5.84 KB
/
docker-compose.yaml
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
version: '2.4'
services:
mysql:
container_name: mattermost-mysql
ports:
- "3306:3306"
extends:
file: build/docker-compose.common.yml
service: mysql
mysql-read-replica:
container_name: mattermost-mysql-read-replica
ports:
- "3307:3306"
extends:
file: build/docker-compose.common.yml
service: mysql-read-replica
postgres:
container_name: mattermost-postgres
ports:
- "5432:5432"
extends:
file: build/docker-compose.common.yml
service: postgres
minio:
container_name: mattermost-minio
ports:
- "9000:9000"
extends:
file: build/docker-compose.common.yml
service: minio
inbucket:
container_name: mattermost-inbucket
ports:
- "10025:10025"
- "10080:10080"
- "10110:10110"
extends:
file: build/docker-compose.common.yml
service: inbucket
openldap:
container_name: mattermost-openldap
ports:
- "389:389"
- "636:636"
extends:
file: build/docker-compose.common.yml
service: openldap
elasticsearch:
container_name: mattermost-elasticsearch
ports:
- "9200:9200"
- "9300:9300"
extends:
file: build/docker-compose.common.yml
service: elasticsearch
dejavu:
container_name: mattermost-dejavu
ports:
- "1358:1358"
extends:
file: build/docker-compose.common.yml
service: dejavu
keycloak:
container_name: mattermost-saml
ports:
- "8484:8080"
extends:
file: build/docker-compose.common.yml
service: keycloak
prometheus:
container_name: mattermost-prometheus
ports:
- "9090:9090"
extends:
file: build/docker-compose.common.yml
service: prometheus
grafana:
container_name: mattermost-grafana
ports:
- "3000:3000"
extends:
file: build/docker-compose.common.yml
service: grafana
start_dependencies:
image: mattermost/mattermost-wait-for-dep:latest
networks:
- mm-test
depends_on:
- mysql
- postgres
- minio
- inbucket
- openldap
- elasticsearch
- prometheus
- grafana
command: postgres:5432 mysql:3306 minio:9000 inbucket:10080 openldap:389 elasticsearch:9200 prometheus:9090 grafana:3000
leader:
build:
context: .
dockerfile: ./build/Dockerfile.buildenv
working_dir: '/home/mattermost-server'
environment:
- "MM_SQLSETTINGS_DATASOURCE=postgres://mmuser:mostest@postgres/mattermost_test?sslmode=disable\u0026connect_timeout=10"
- "MM_NO_DOCKER=true"
- "RUN_SERVER_IN_BACKGROUND=false"
- "MM_CLUSTERSETTINGS_ENABLE=true"
- "MM_CLUSTERSETTINGS_CLUSTERNAME=mm_dev_cluster"
networks:
- mm-test
depends_on:
- start_dependencies
volumes:
- './:/home/mattermost-server'
- './../mattermost-webapp:/home/mattermost-webapp'
- './../enterprise:/home/enterprise'
restart: on-failure
healthcheck:
test: ["CMD", "curl", "-f", "http://leader:8065/api/v4/system/ping"]
interval: 5s
timeout: 30s
retries: 30
start_period: 5m
user: ${CURRENT_UID}
command: ['make', 'run-server']
expose:
- "8065"
- "8064/tcp"
- "8064/udp"
- "8074/tcp"
- "8074/udp"
- "8075"
follower:
build:
context: .
dockerfile: ./build/Dockerfile.buildenv
working_dir: '/home/mattermost-server'
environment:
- "MM_SQLSETTINGS_DATASOURCE=postgres://mmuser:mostest@postgres/mattermost_test?sslmode=disable\u0026connect_timeout=10"
- "MM_NO_DOCKER=true"
- "RUN_SERVER_IN_BACKGROUND=false"
- "MM_CLUSTERSETTINGS_ENABLE=true"
- "MM_CLUSTERSETTINGS_CLUSTERNAME=mm_dev_cluster"
networks:
- mm-test
depends_on:
- leader
volumes:
- './:/home/mattermost-server'
- './../mattermost-webapp:/home/mattermost-webapp'
- './../enterprise:/home/enterprise'
healthcheck:
test: ["CMD", "curl", "-f", "http://follower:8065/api/v4/system/ping"]
interval: 5s
timeout: 30s
retries: 30
start_period: 5m
user: ${CURRENT_UID}
command: ['make', 'run-server']
restart: on-failure
expose:
- "8065"
- "8064/tcp"
- "8064/udp"
- "8074/tcp"
- "8074/udp"
- "8075"
follower2:
build:
context: .
dockerfile: ./build/Dockerfile.buildenv
working_dir: '/home/mattermost-server'
environment:
- "MM_SQLSETTINGS_DATASOURCE=postgres://mmuser:mostest@postgres/mattermost_test?sslmode=disable\u0026connect_timeout=10"
- "MM_NO_DOCKER=true"
- "RUN_SERVER_IN_BACKGROUND=false"
- "MM_CLUSTERSETTINGS_ENABLE=true"
- "MM_CLUSTERSETTINGS_CLUSTERNAME=mm_dev_cluster"
networks:
- mm-test
depends_on:
- leader
volumes:
- './:/home/mattermost-server'
- './../mattermost-webapp:/home/mattermost-webapp'
- './../enterprise:/home/enterprise'
healthcheck:
test: ["CMD", "curl", "-f", "http://follower2:8065/api/v4/system/ping"]
interval: 5s
timeout: 30s
retries: 30
start_period: 5m
user: ${CURRENT_UID}
command: ['make', 'run-server']
restart: on-failure
expose:
- "8065"
- "8064/tcp"
- "8064/udp"
- "8074/tcp"
- "8074/udp"
- "8075"
haproxy:
image: nginx
networks:
- mm-test
volumes:
- ./build/docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
restart: on-failure
depends_on:
leader:
condition: service_healthy
follower:
condition: service_healthy
follower2:
condition: service_healthy
ports:
- "8065:8065"
networks:
mm-test:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.254.0/24
ip_range: 192.168.254.0/24