forked from mrckndt/CS-Repro-Mattermost
Compare commits
1 Commits
main
...
d0a1dce9a6
| Author | SHA1 | Date | |
|---|---|---|---|
| d0a1dce9a6 |
27
Makefile
27
Makefile
@@ -1,17 +1,11 @@
|
|||||||
.PHONY: stop start check_mattermost
|
.PHONY: stop start check_mattermost
|
||||||
|
|
||||||
logs:
|
logs:
|
||||||
@echo "Following logs..."
|
@echo "Following logs..."
|
||||||
@docker-compose logs --follow
|
@docker-compose logs --follow
|
||||||
@echo "Done"
|
@echo "Done"
|
||||||
|
|
||||||
setup-mattermost:
|
setup-mattermost:
|
||||||
@cp ./files/mattermost/defaultConfig.json ./volumes/mattermost/config
|
|
||||||
@cp ./files/mattermost/replicaConfig.json ./volumes/mattermost/config
|
|
||||||
@cp ./files/mattermost/rtcdConfig.json ./volumes/mattermost/config
|
|
||||||
@cp ./files/mattermost/samlCert.crt ./volumes/mattermost/config
|
|
||||||
@cp ./license.mattermost ./volumes/mattermost/config/license.mattermost-enterprise
|
|
||||||
|
|
||||||
@./scripts/mattermost.sh setup
|
@./scripts/mattermost.sh setup
|
||||||
|
|
||||||
check-mattermost:
|
check-mattermost:
|
||||||
@@ -26,9 +20,9 @@ restore-keycloak:
|
|||||||
echo-logins:
|
echo-logins:
|
||||||
@./scripts/general.sh logins
|
@./scripts/general.sh logins
|
||||||
|
|
||||||
run:
|
run:
|
||||||
@echo "Starting..."
|
@echo "Starting..."
|
||||||
@make restore-keycloak
|
#@make restore-keycloak
|
||||||
@make run-core
|
@make run-core
|
||||||
@make setup-mattermost
|
@make setup-mattermost
|
||||||
@make echo-logins
|
@make echo-logins
|
||||||
@@ -36,7 +30,7 @@ run:
|
|||||||
|
|
||||||
run-core:
|
run-core:
|
||||||
@echo "Starting the core services... hang in there."
|
@echo "Starting the core services... hang in there."
|
||||||
@docker-compose up -d postgres openldap prometheus grafana elasticsearch mattermost keycloak mitmproxy
|
@docker-compose up -d postgres openldap prometheus grafana elasticsearch mattermost keycloak #mitmproxy
|
||||||
|
|
||||||
run-db-replicas:
|
run-db-replicas:
|
||||||
@echo "Starting with replicas. Hang in there..."
|
@echo "Starting with replicas. Hang in there..."
|
||||||
@@ -45,16 +39,11 @@ run-db-replicas:
|
|||||||
@echo "Should be up and running. Go crazy."
|
@echo "Should be up and running. Go crazy."
|
||||||
|
|
||||||
|
|
||||||
## Need a way to modify the
|
## Need a way to modify the
|
||||||
run-mm-replicas:
|
run-mm-replicas:
|
||||||
@echo "Starting Mattermost replicas. Hang in there..."
|
@echo "Starting Mattermost replicas. Hang in there..."
|
||||||
@docker exec -it cs-repro-mattermost mmctl config set ClusterSettings.Enable true --local
|
@docker exec -it cs-repro-mattermost mmctl config set ClusterSettings.Enable true --local
|
||||||
@docker-compose down mattermost
|
@docker-compose down mattermost
|
||||||
@cp ./files/mattermost/defaultConfig.json ./volumes/mattermost_2/config
|
|
||||||
@cp ./files/mattermost/replicaConfig.json ./volumes/mattermost_2/config
|
|
||||||
@cp ./files/mattermost/rtcdConfig.json ./volumes/mattermost_2/config
|
|
||||||
@cp ./files/mattermost/samlCert.crt ./volumes/mattermost_2/config
|
|
||||||
@cp ./license.mattermost ./volumes/mattermost/mattermost_2/license.mattermost-enterprise
|
|
||||||
@docker-compose up -d mattermost mattermost-2
|
@docker-compose up -d mattermost mattermost-2
|
||||||
@docker exec -it -u root cs-repro-mattermost-2 /bin/bash update-ca-certificates
|
@docker exec -it -u root cs-repro-mattermost-2 /bin/bash update-ca-certificates
|
||||||
@echo "Should be up and running. Go crazy."
|
@echo "Should be up and running. Go crazy."
|
||||||
@@ -71,7 +60,7 @@ run-all: run run-db-replicas run-mm-replicas
|
|||||||
start:
|
start:
|
||||||
@echo "Starting the existing deployment..."
|
@echo "Starting the existing deployment..."
|
||||||
@docker-compose start
|
@docker-compose start
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
@echo "Stopping..."
|
@echo "Stopping..."
|
||||||
@docker-compose stop
|
@docker-compose stop
|
||||||
@@ -116,12 +105,12 @@ delete-dockerfiles:
|
|||||||
|
|
||||||
delete-data: stop delete-dockerfiles
|
delete-data: stop delete-dockerfiles
|
||||||
|
|
||||||
nuke:
|
nuke:
|
||||||
@echo "Nuking Docker..."
|
@echo "Nuking Docker..."
|
||||||
@docker-compose down --volumes --remove-orphans
|
@docker-compose down --volumes --remove-orphans
|
||||||
@make delete-data
|
@make delete-data
|
||||||
|
|
||||||
nuke-rmi:
|
nuke-rmi:
|
||||||
@echo "Nuking Docker with images..."
|
@echo "Nuking Docker with images..."
|
||||||
@docker-compose down --rmi all --volumes --remove-orphans
|
@docker-compose down --rmi all --volumes --remove-orphans
|
||||||
@make delete-data
|
@make delete-data
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
mitmproxy:
|
#mitmproxy:
|
||||||
condition: service_started
|
# condition: service_started
|
||||||
image: mattermost/mattermost-enterprise-edition:release-9.11
|
image: mattermost/mattermost-enterprise-edition:release-9.11
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
security_opt:
|
security_opt:
|
||||||
@@ -86,13 +86,18 @@ services:
|
|||||||
- ./volumes/mattermost/plugins:/mattermost/plugins:rw
|
- ./volumes/mattermost/plugins:/mattermost/plugins:rw
|
||||||
- ./volumes/mattermost/client/plugins:/mattermost/client/plugins:rw
|
- ./volumes/mattermost/client/plugins:/mattermost/client/plugins:rw
|
||||||
- ./volumes/mattermost/bleve-indexes:/mattermost/bleve-indexes: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/defaultConfig.json:/mattermost/config/defaultConfig.json:ro
|
||||||
|
#- ./files/mattermost/replicaConfig.json:/mattermost/config/replicaConfig.json:ro
|
||||||
|
#- ./files/mattermost/rtcdConfig.json:/mattermost/config/rtcdConfig.json:ro
|
||||||
|
|
||||||
## Files are required for the mitmproxy on the box
|
## Files are required for the mitmproxy on the box
|
||||||
- ./files/mitmproxy/mitmproxy-ca.pem:/etc/ssl/certs/mitmproxy-ca.pem
|
- ./files/mitmproxy/mitmproxy-ca.pem:/etc/ssl/certs/mitmproxy-ca.pem
|
||||||
- ./files/mitmproxy/mitmproxy-dhparam.pem:/etc/ssl/certs/mitmproxy-dhparam.pem
|
- ./files/mitmproxy/mitmproxy-dhparam.pem:/etc/ssl/certs/mitmproxy-dhparam.pem
|
||||||
environment:
|
environment:
|
||||||
# - HTTP_PROXY=http://cs-repro-mitmproxy:8080
|
#- HTTP_PROXY=http://cs-repro-mitmproxy:8080
|
||||||
# - HTTPS_PROXY=http://cs-repro-mitmproxy:8080
|
#- HTTPS_PROXY=http://cs-repro-mitmproxy:8080
|
||||||
- MM_SqlSettings_DriverName=postgres
|
- 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_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_SAMLSETTINGS_IDPCERTIFICATEFILE=/mattermost/config/saml-cert.crt
|
||||||
@@ -110,7 +115,7 @@ services:
|
|||||||
container_name: cs-repro-keycloak
|
container_name: cs-repro-keycloak
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
image: quay.io/keycloak/keycloak:18.0.0
|
image: quay.io/keycloak/keycloak:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/keycloak:/opt/keycloak/data:rw
|
- ./volumes/keycloak:/opt/keycloak/data:rw
|
||||||
environment:
|
environment:
|
||||||
@@ -139,8 +144,8 @@ services:
|
|||||||
- ./volumes/elastic/data:/usr/share/elasticsearch/data
|
- ./volumes/elastic/data:/usr/share/elasticsearch/data
|
||||||
- ./volumes/elastic/plugins:/usr/share/elasticsearch/plugins
|
- ./volumes/elastic/plugins:/usr/share/elasticsearch/plugins
|
||||||
command: >
|
command: >
|
||||||
/bin/sh -c "./bin/elasticsearch-plugin list | grep -q analysis-icu
|
/bin/sh -c "./bin/elasticsearch-plugin list | grep -q analysis-icu
|
||||||
|| yes | ./bin/elasticsearch-plugin install --silent analysis-icu;
|
|| yes | ./bin/elasticsearch-plugin install --silent analysis-icu;
|
||||||
/usr/local/bin/docker-entrypoint.sh eswrapper"
|
/usr/local/bin/docker-entrypoint.sh eswrapper"
|
||||||
ports:
|
ports:
|
||||||
- 9200:9200
|
- 9200:9200
|
||||||
@@ -199,9 +204,9 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
mitmproxy:
|
#mitmproxy:
|
||||||
condition: service_started
|
# condition: service_started
|
||||||
image: mattermost/mattermost-enterprise-edition:release-9.7
|
image: mattermost/mattermost-enterprise-edition:release-9.11
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
@@ -219,10 +224,10 @@ services:
|
|||||||
- ./volumes/mattermost_2/plugins:/mattermost/plugins:rw
|
- ./volumes/mattermost_2/plugins:/mattermost/plugins:rw
|
||||||
- ./volumes/mattermost_2/client/plugins:/mattermost/client/plugins:rw
|
- ./volumes/mattermost_2/client/plugins:/mattermost/client/plugins:rw
|
||||||
- ./volumes/mattermost_2/bleve-indexes:/mattermost/bleve-indexes:rw
|
- ./volumes/mattermost_2/bleve-indexes:/mattermost/bleve-indexes:rw
|
||||||
# - ./license.mattermost:/mattermost/config/license.mattermost-enterprise:ro
|
- ./license.mattermost:/mattermost/config/license.mattermost-enterprise:ro
|
||||||
# - ./files/mattermost/samlCert.crt:/mattermost/config/saml-cert.crt
|
- ./files/mattermost/samlCert.crt:/mattermost/config/saml-cert.crt
|
||||||
# - ./files/mattermost/defaultConfig.json:/mattermost/config/defaultConfig.json:ro
|
- ./files/mattermost/defaultConfig.json:/mattermost/config/defaultConfig.json:ro
|
||||||
# - ./files/mattermost/replicaConfig.json:/mattermost/config/replicaConfig.json:ro
|
- ./files/mattermost/replicaConfig.json:/mattermost/config/replicaConfig.json:ro
|
||||||
|
|
||||||
## Files are required for the mitmproxy on the box
|
## Files are required for the mitmproxy on the box
|
||||||
- ./files/mitmproxy/mitmproxy-ca.pem:/etc/ssl/certs/mitmproxy-ca.pem
|
- ./files/mitmproxy/mitmproxy-ca.pem:/etc/ssl/certs/mitmproxy-ca.pem
|
||||||
@@ -253,16 +258,16 @@ services:
|
|||||||
- "8443:8443/udp"
|
- "8443:8443/udp"
|
||||||
- "8443:8443/tcp"
|
- "8443:8443/tcp"
|
||||||
- "8045:8045"
|
- "8045:8045"
|
||||||
mitmproxy:
|
#mitmproxy:
|
||||||
container_name: cs-repro-mitmproxy
|
# container_name: cs-repro-mitmproxy
|
||||||
image: mitmproxy/mitmproxy
|
# image: mitmproxy/mitmproxy
|
||||||
command: mitmweb --web-host 0.0.0.0 --set confdir=/certs --mode transparent
|
# command: mitmweb --web-host 0.0.0.0 --set confdir=/certs --mode transparent
|
||||||
volumes:
|
# volumes:
|
||||||
- ./files/mitmproxy:/certs
|
# - ./files/mitmproxy:/certs
|
||||||
ports:
|
# ports:
|
||||||
- "8180:8080"
|
# - "8180:8080"
|
||||||
- "8181:8081"
|
# - "8181:8081"
|
||||||
restart: unless-stopped
|
# restart: unless-stopped
|
||||||
# mysql:
|
# mysql:
|
||||||
# container_name: cs-repro-mysql
|
# container_name: cs-repro-mysql
|
||||||
# image: mysql:8
|
# image: mysql:8
|
||||||
@@ -288,4 +293,4 @@ services:
|
|||||||
# # Where our data will be persisted
|
# # Where our data will be persisted
|
||||||
# volumes:
|
# volumes:
|
||||||
# - ./volumes/db/mysql:/var/lib/mysql
|
# - ./volumes/db/mysql:/var/lib/mysql
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user