-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
291 lines (286 loc) · 9.87 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
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
services:
postgres:
container_name: cs-repro-postgres
image: postgres:16-alpine
restart: unless-stopped
ports:
- "5432:5432"
security_opt:
- no-new-privileges:true
pids_limit: 100
read_only: false
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- ./volumes/db/primary/data:/var/lib/postgresql/data
- ./files/postgres/primary/init.sh:/docker-entrypoint-initdb.d/init.sh
- ./files/postgres/primary/primary_config.conf:/files/postgres/primary/primary_config.conf
healthcheck:
test: pg_isready -U mmuser -d mattermost
interval: 10s
timeout: 3s
retries: 3
environment:
- POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password
- POSTGRES_DB=mattermost
- LISTEN_ADDRESS="*"
openldap:
platform: linux/amd64
container_name: cs-repro-openldap
hostname: openldap
restart: unless-stopped
image: rroemhild/test-openldap:latest
volumes:
- ./ldap:/mattermost/config:rw
ports:
- "10389:10389"
- "10636:10636"
prometheus:
container_name: cs-repro-prometheus
image: prom/prometheus:latest
restart: unless-stopped
ports:
- 9090:9090
volumes:
- ./files/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./volumes/prometheus:/prometheus
grafana:
container_name: cs-repro-grafana
image: grafana/grafana:10.0.4
ports:
- 3000:3000
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- ./files/grafana/dashboards:/var/lib/grafana/dashboards
- ./files/grafana/provisioning:/etc/grafana/provisioning
- ./volumes/grafana:/var/lib/grafana
mattermost:
platform: linux/amd64
container_name: cs-repro-mattermost
depends_on:
postgres:
condition: service_healthy
mitmproxy:
condition: service_started
image: mattermost/mattermost-enterprise-edition:release-9.11
restart: unless-stopped
security_opt:
- no-new-privileges:true
pids_limit: 200
read_only: false
ports:
- "8065:8065"
- "8067:8067"
tmpfs:
- /tmp
volumes:
- ./volumes/mattermost/config:/mattermost/config:rw
- ./volumes/mattermost/data:/mattermost/data:rw
- ./volumes/mattermost/logs:/mattermost/logs:rw
- ./volumes/mattermost/plugins:/mattermost/plugins:rw
- ./volumes/mattermost/client/plugins:/mattermost/client/plugins:rw
- ./volumes/mattermost/bleve-indexes:/mattermost/bleve-indexes:rw
## Files are required for the mitmproxy on the box
- ./files/mitmproxy/mitmproxy-ca.pem:/etc/ssl/certs/mitmproxy-ca.pem
- ./files/mitmproxy/mitmproxy-dhparam.pem:/etc/ssl/certs/mitmproxy-dhparam.pem
environment:
# - HTTP_PROXY=http://cs-repro-mitmproxy:8080
# - HTTPS_PROXY=http://cs-repro-mitmproxy:8080
- MM_SqlSettings_DriverName=postgres
- MM_SqlSettings_DataSource=postgres://mmuser:mmuser_password@cs-repro-postgres:5432/mattermost?sslmode=disable&connect_timeout=10&binary_parameters=yes
- MM_SAMLSETTINGS_IDPCERTIFICATEFILE=/mattermost/config/saml-cert.crt
- MM_ServiceSettings_EnableLocalMode=true
- MM_ServiceSettings_LocalModeSocketLocation=/var/tmp/mattermost_local.socket
- MM_ServiceSettings_LicenseFileLocation=/mattermost/config/license.mattermost-enterprise
## mysql Settings
# - MM_SqlSettings_DriverName=mysql
# - MM_SqlSettings_DataSource=mmuser:mmuser_password@tcp(mysql:3306)/mattermost?charset=utf8mb4,utf8&writeTimeout=30s
## Disable this to migrate your config to the database
# - MM_CONFIG=postgres://mmuser:mmuser_password@cs-repro-postgres:5432/mattermost?sslmode=disable&connect_timeout=10&binary_parameters=yes
keycloak:
container_name: cs-repro-keycloak
restart: unless-stopped
platform: linux/amd64
image: quay.io/keycloak/keycloak:18.0.0
volumes:
- ./volumes/keycloak:/opt/keycloak/data:rw
environment:
- PROXY_ADDRESS_FORWARDING="true"
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
ports:
- 8080:8080
command:
- start-dev
elasticsearch:
image: elasticsearch:7.17.10
container_name: cs-repro-elasticsearch
restart: unless-stopped
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- logger.level=DEBUG
ulimits:
memlock:
soft: -1
hard: -1
cap_add:
- IPC_LOCK
volumes:
- ./volumes/elastic/data:/usr/share/elasticsearch/data
- ./volumes/elastic/plugins:/usr/share/elasticsearch/plugins
command: >
/bin/sh -c "./bin/elasticsearch-plugin list | grep -q analysis-icu
|| yes | ./bin/elasticsearch-plugin install --silent analysis-icu;
/usr/local/bin/docker-entrypoint.sh eswrapper"
ports:
- 9200:9200
- 9300:9300
postgres-replica-1:
container_name: cs-repro-postgres-replica-1
environment:
- POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password
- LISTEN_ADDRESS="*"
- REPLICA_NAME=replica_1
image: postgres:16-alpine
restart: unless-stopped
ports:
- "5433:5432"
security_opt:
- no-new-privileges:true
pids_limit: 100
read_only: false
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- ./files/postgres/replica/init.sh:/docker-entrypoint-initdb.d/init.sh
- ./volumes/db/replica_1/data:/var/lib/postgresql/data
- ./files/postgres/replica:/files/postgres/replica
depends_on:
- postgres
postgres-replica-2:
container_name: cs-repro-postgres-replica-2
environment:
- POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password
- LISTEN_ADDRESS="*"
- REPLICA_NAME=replica_2
image: postgres:16-alpine
restart: unless-stopped
ports:
- "5434:5432"
security_opt:
- no-new-privileges:true
pids_limit: 100
read_only: false
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- ./files/postgres/replica/init.sh:/docker-entrypoint-initdb.d/init.sh
- ./files/postgres/replica:/files/postgres/replica
- ./volumes/db/replica_2/data:/var/lib/postgresql/data
depends_on:
- postgres
mattermost-2:
platform: linux/amd64
container_name: cs-repro-mattermost-2
depends_on:
postgres:
condition: service_healthy
mitmproxy:
condition: service_started
image: mattermost/mattermost-enterprise-edition:release-9.7
restart: unless-stopped
security_opt:
- no-new-privileges:true
pids_limit: 200
read_only: false
ports:
- "8066:8065"
- "8068:8067"
tmpfs:
- /tmp
volumes:
- ./volumes/mattermost/config:/mattermost/config:rw
- ./volumes/mattermost/data:/mattermost/data:rw
- ./volumes/mattermost_2/logs:/mattermost/logs:rw
- ./volumes/mattermost_2/plugins:/mattermost/plugins:rw
- ./volumes/mattermost_2/client/plugins:/mattermost/client/plugins:rw
- ./volumes/mattermost_2/bleve-indexes:/mattermost/bleve-indexes:rw
# - ./license.mattermost:/mattermost/config/license.mattermost-enterprise:ro
# - ./files/mattermost/samlCert.crt:/mattermost/config/saml-cert.crt
# - ./files/mattermost/defaultConfig.json:/mattermost/config/defaultConfig.json:ro
# - ./files/mattermost/replicaConfig.json:/mattermost/config/replicaConfig.json:ro
## Files are required for the mitmproxy on the box
- ./files/mitmproxy/mitmproxy-ca.pem:/etc/ssl/certs/mitmproxy-ca.pem
- ./files/mitmproxy/mitmproxy-dhparam.pem:/etc/ssl/certs/mitmproxy-dhparam.pem
environment:
- HTTP_PROXY=http://cs-repro-mitmproxy:8080
- HTTPS_PROXY=http://cs-repro-mitmproxy:8080
- MM_SqlSettings_DriverName=postgres
- MM_SqlSettings_DataSource=postgres://mmuser:mmuser_password@cs-repro-postgres:5432/mattermost?sslmode=disable&connect_timeout=10&binary_parameters=yes
- MM_SAMLSETTINGS_IDPCERTIFICATEFILE=/mattermost/config/saml-cert.crt
- MM_ServiceSettings_EnableLocalMode=true
- MM_ServiceSettings_LocalModeSocketLocation=/var/tmp/mattermost_local.socket
- MM_ServiceSettings_LicenseFileLocation=/mattermost/config/license.mattermost-enterprise
mattermost-rtcd:
container_name: cs-repro-mattermost-rtcd
platform: linux/amd64
image: mattermost/rtcd:latest
restart: unless-stopped
volumes:
- ./volumes/rtcd/logs:/logs:rw
environment:
- RTCD_LOGGER_ENABLEFILE=true
- RTCD_LOGGER_FILELOCATION=/logs
- RTCD_LOGGER_FILELEVEL=DEBUG
- RTCD_API_SECURITY_ALLOWSELFREGISTRATION=true
- RTCD_LOGGER_CONSOLELEVEL=DEBUG
ports:
- "8443:8443/udp"
- "8443:8443/tcp"
- "8045:8045"
mitmproxy:
container_name: cs-repro-mitmproxy
image: mitmproxy/mitmproxy
command: mitmweb --web-host 0.0.0.0 --set confdir=/certs --mode transparent
volumes:
- ./files/mitmproxy:/certs
ports:
- "8180:8080"
- "8181:8081"
restart: unless-stopped
# mysql:
# container_name: cs-repro-mysql
# image: mysql:8
# restart: always
# environment:
# MYSQL_DATABASE: "mattermost"
# # So you don't have to use root, but you can if you like
# MYSQL_USER: "mmuser"
# # You can use whatever password you like
# MYSQL_PASSWORD: "mmuser_password"
# # Password for root access
# MYSQL_ROOT_PASSWORD: "mmuser_password"
# healthcheck:
# test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
# timeout: 20supdat
# retries: 10
# ports:
# # <Port exposed> : <MySQL Port running inside container>
# - "3306:3306"
# expose:
# # Opens port 3306 on the container
# - "3306"
# # Where our data will be persisted
# volumes:
# - ./volumes/db/mysql:/var/lib/mysql