Files
mattermost/docker-compose.yaml
Martin Raymond Kraft 58dce5930e [MM-31094] Replication Lag (#16888)
* MM-31094: Adds tooling to develop and test using a MySQL instance with replication lag. Adds some lazy lookups to fallback to master if results are not found.

* MM-31094: Removes mysql-read-replica from default docker services.

* MM-31094: Switches (store..SessionStore).Get and (store.TeamStore).GetMember to using context.Context.

* MM-31094: Updates (store.UsersStore).Get to use context.

* MM-31094: Updates (store.PostStore).Get to use context.

* MM-31094: Removes feature flag and config setting.

* MM-31094: Rolls back some master reads.

* MM-31094: Rolls a non-cache read.

* MM-31094: Removes feature flag from the store.

* MM-31094: Removes unused constant and struct field.

* MM-31094: Removes some old feature flag references.

* MM-31094: Fixes some tests.

* MM-31094: App layers fix.

* MM-31094: Fixes mocks.

* MM-31094: Don't reparse flag.

* MM-31094: No reparse.

* MM-31094: Removed unused FeatureFlags field.

* MM-31094: Removes unnecessary feature flags variable declarations.

* MM-31094: Fixes copy-paste error.

* MM-31094: Fixes logical error.

* MM-30194: Removes test method from store.

* Revert "MM-30194: Removes test method from store."

This reverts commit d5a6e8529b.

* MM-31094: Conforming to make's strange syntax.

* MM-31094: Configures helper for read replica with option.

* MM-31094: Adds some missing ctx's.

* MM-31094: WIP

* MM-31094: Updates test names.

* MM-31094: WIP

* MM-31094: Removes unnecessary master reads.

* MM-31094: ID case changes out of scope.

* MM-31094: Removes unused context.

* MM-31094: Switches to a helper. Removes some var naming changes. Fixes a merge error.

* MM-31094: Removes SQLITE db driver ref.

* MM-31094: Layer generate fix.

* MM-31094: Removes unnecessary changes.

* MM-31094: Moves test method.

* MM-31094: Re-add previous fix.

* MM-31094: Removes make command for dev.

* MM-31094: Fix for login.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-03-12 12:37:30 -05:00

175 lines
4.3 KiB
YAML

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"
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: 10s
retries: 30
command: ['make', 'run-server']
expose:
- "8065"
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"
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: 10s
retries: 30
command: ['make', 'run-server']
restart: on-failure
expose:
- "8065"
haproxy:
image: nginx
networks:
- mm-test
volumes:
- ./build/docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
restart: on-failure
depends_on:
- leader
- follower
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