Compare commits
3 Commits
2.1.0+10.5
...
backup-tro
Author | SHA1 | Date | |
---|---|---|---|
80d21a411b | |||
6485852ae0 | |||
5f6b845212 |
@ -33,7 +33,4 @@ ORG_NAME="My Organization"
|
||||
#SSO_DOMAIN=accounts.example.com
|
||||
#SSO_APP=mattermost
|
||||
#SSO_ID=
|
||||
#SECRET_MATTERMOST_SSO_SECRET_VERSION=v1
|
||||
|
||||
## Enable enterprise version (requires a valid license)
|
||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.license.yml"
|
||||
#SECRET_MATTERMOST_SSO_SECRET_VERSION=v1
|
@ -79,13 +79,6 @@ This is how to configure your Mattermost server to accept logins from your Authe
|
||||
- Go to https://YOURAPPNAME/admin_console/authentication/email
|
||||
- Set **Enable sign-in with email** and **Enable sign-in with username** to `false`
|
||||
|
||||
## Use a Mattermost Enterprise License
|
||||
**NOTE: This deploys non-FOSS code and requires you to pay Mattermost for a license to enable features. Not recommended unless you know what you're doing.**
|
||||
- `abra app config YOURAPPNAME`
|
||||
- Uncomment the section which starts with `## Enable enterprise version`
|
||||
- `abra app undeploy YOURAPPNAME`
|
||||
- `abra app deploy YOURAPPNAME`
|
||||
|
||||
|
||||
[`abra`]: https://git.coopcloud.tech/coop-cloud/abra
|
||||
[`coop-cloud/traefik`]: https://git.coopcloud.tech/coop-cloud/traefik
|
||||
|
16
backup-mattermost.sh
Normal file
16
backup-mattermost.sh
Normal file
@ -0,0 +1,16 @@
|
||||
if [ "$1" == "pre-backup" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "pre-backup" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "pre-restore" ]; then
|
||||
# kill the running plugins that need to be overwritten
|
||||
pkill plugins
|
||||
fi
|
||||
|
||||
if [ "$1" == "post-restore" ]; then
|
||||
mmctl config reload --local
|
||||
fi
|
15
backup-postgres.sh
Normal file
15
backup-postgres.sh
Normal file
@ -0,0 +1,15 @@
|
||||
if [ "$1" == "pre-backup" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "post-backup" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "pre-restore" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "post-restore" ]; then
|
||||
pg_restore -U $POSTGRES_USER -d $POSTGRES_DB -c /var/lib/postgresql/data/postgres-backup
|
||||
fi
|
@ -1,5 +0,0 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: mattermost/mattermost-enterprise-edition:10.5.0
|
@ -28,10 +28,12 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||
- "coop-cloud.${STACK_NAME}.version=2.1.0+10.5.0"
|
||||
- "coop-cloud.${STACK_NAME}.version=1.5.3+9.11.8"
|
||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||
- "backupbot.backup=true"
|
||||
- "backupbot.backup.path=/mattermost,/etc/ssl"
|
||||
- "backupbot.restore.pre-hook=/restore.sh pre"
|
||||
- "backupbot.restore.post-hook=/restore.sh post"
|
||||
configs:
|
||||
- source: abra_mattermost_entrypoint
|
||||
target: /abra-mattermost-entrypoint.sh
|
||||
@ -56,9 +58,10 @@ services:
|
||||
deploy:
|
||||
labels:
|
||||
backupbot.backup: "true"
|
||||
backupbot.backup.pre-hook: "PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /var/lib/postgresql/data/postgres-backup.sql"
|
||||
backupbot.backup.post-hook: "rm -rf /var/lib/postgresql/data/postgres-backup.sql"
|
||||
backupbot.backup.pre-hook: "PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} --format=directory -f /var/lib/postgresql/data/postgres-backup"
|
||||
backupbot.backup.post-hook: "rm -rf /var/lib/postgresql/data/postgres-backup"
|
||||
backupbot.backup.path: "/var/lib/postgresql/data/"
|
||||
backupbot.restore.post-hook: "/backup-postgres.sh post"
|
||||
|
||||
secrets:
|
||||
postgres_password:
|
||||
|
@ -1 +0,0 @@
|
||||
Note that the first time you enable the email or sso configurations it will reset your existing Mattermost configuration.
|
Reference in New Issue
Block a user