mirror of
https://github.com/coltoneshaw/CS-Repro-Mattermost.git
synced 2025-12-23 10:01:30 +01:00
203 lines
6.7 KiB
YAML
203 lines
6.7 KiB
YAML
services:
|
|
# 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: 20s
|
|
# 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
|
|
postgres:
|
|
container_name: cs-repro-postgres
|
|
environment:
|
|
- POSTGRES_USER=mmuser
|
|
- POSTGRES_PASSWORD=mmuser_password
|
|
- POSTGRES_DB=mattermost
|
|
- LISTEN_ADDRESS="*"
|
|
image: postgres:14-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/var/lib/postgresql/data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: pg_isready -U mmuser -d mattermost
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 3
|
|
# postgres-replica:
|
|
# container_name: cs-repro-postgres-replica
|
|
# environment:
|
|
# - POSTGRES_USER=mmuser
|
|
# - POSTGRES_PASSWORD=mmuser_password
|
|
# # - POSTGRES_DB=mattermost
|
|
# - LISTEN_ADDRESS="*"
|
|
# image: postgres:13-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:
|
|
# # - ./volumes/db-replica/var/lib/postgresql/data:/var/lib/postgresql/data
|
|
# - ./volumes/db-replica/data2:/var/lib/postgresql/data
|
|
# postgres-replica2:
|
|
# container_name: cs-repro-postgres-replica2
|
|
# environment:
|
|
# - POSTGRES_USER=mmuser
|
|
# - POSTGRES_PASSWORD=mmuser_password
|
|
# # - POSTGRES_DB=mattermost
|
|
# - LISTEN_ADDRESS="*"
|
|
# image: postgres:13-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:
|
|
# # - ./volumes/db-replica2/var/lib/postgresql/data:/var/lib/postgresql/data
|
|
# - ./volumes/db-replica2/data2:/var/lib/postgresql/data
|
|
openldap:
|
|
platform: linux/amd64
|
|
container_name: cs-repro-openldap
|
|
hostname: openldap
|
|
restart: unless-stopped
|
|
image: rroemhild/test-openldap:latest
|
|
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
|
|
image: mattermost/mattermost-enterprise-edition:release-9.6
|
|
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
|
|
- ./license.mattermost:/mattermost/config/license.mattermost-enterprise:ro
|
|
- ./files/mattermost/samlCert.crt:/mattermost/config/saml-cert.crt
|
|
- ./files/mattermost/advancedLogging.json:/mattermost/config/advancedLogging.json:ro
|
|
- ./files/mattermost/defaultConfig.json:/mattermost/config/defaultConfig.json:ro
|
|
environment:
|
|
- 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_SqlSettings_DriverName=mysql
|
|
# - MM_SqlSettings_DataSource=mmuser:mmuser_password@tcp(mysql:3306)/mattermost?charset=utf8mb4,utf8&writeTimeout=30s
|
|
- MM_ServiceSettings_EnableLocalMode=true
|
|
- MM_ServiceSettings_LocalModeSocketLocation=/var/tmp/mattermost_local.socket
|
|
- MM_ServiceSettings_LicenseFileLocation=/mattermost/config/license.mattermost-enterprise
|
|
## 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 |