add config reset command
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
marlon 2025-02-10 18:14:12 -05:00
parent c2d2272621
commit c173127cf8
3 changed files with 20 additions and 3 deletions

View File

@ -25,11 +25,13 @@
6. Open the configured domain in your browser to finish set-up 6. Open the configured domain in your browser to finish set-up
## Enable Email ## Enable Email
**WARNING: Following these steps will overwrite the configuration of your Mattermost instance. Probably only run it on a fresh deployment.**
- `abra app config YOURAPPNAME` - `abra app config YOURAPPNAME`
- Uncomment the section starting with **Email Support** - Uncomment the section starting with **Email Support**
- `abra app secret i chat.justiceexchange.org smtp_pass v1 'yourSMTPpassword'` - `abra app secret i chat.justiceexchange.org smtp_pass v1 'yourSMTPpassword'`
- `abra app undeploy YOURAPPNAME` - `abra app undeploy YOURAPPNAME`
- `abra app deploy YOURAPPNAME` - `abra app deploy YOURAPPNAME`
- `abra app command -C YOURAPPNAME app reset_config` <- This will overwrite your configuration
## Enable SSO with Authentik ## Enable SSO with Authentik
This is how to configure your Mattermost server to accept logins from your Authentik SSO provider. This is how to configure your Mattermost server to accept logins from your Authentik SSO provider.
@ -63,13 +65,14 @@ This is how to configure your Mattermost server to accept logins from your Authe
- **Submit** - **Submit**
### Configure Mattermost ### Configure Mattermost
**WARNING: Following these steps will overwrite the configuration of your Mattermost instance** **WARNING: Following these steps will overwrite the configuration of your Mattermost instance. Probably only run it on a fresh deployment.**
- `abra app configure YOURAPPNAME` - `abra app configure YOURAPPNAME`
- Uncomment the section starting with `## SSO config` - Uncomment the section starting with `## SSO config`
- Set `SSO_ID` to the value you saved when configuring Authentik - Set `SSO_ID` to the value you saved when configuring Authentik
- `abra app secret insert YOURAPPNAME mattermost_sso_secret v1 <the authentik provider secret you saved>` - `abra app secret insert YOURAPPNAME mattermost_sso_secret v1 <the authentik provider secret you saved>`
- `abra app undeploy YOURAPPNAME` - `abra app undeploy YOURAPPNAME`
- `abra app deploy YOURAPPNAME` - `abra app deploy YOURAPPNAME`
- `abra app command -C YOURAPPNAME app reset_config` <- This will overwrite your configuration
### Disable non-SSO login (Optional) ### Disable non-SSO login (Optional)
- Ensure that your SSO user has the **System Admin** role: https://YOURAPPNAME/admin_console/user_management/users - Ensure that your SSO user has the **System Admin** role: https://YOURAPPNAME/admin_console/user_management/users

View File

@ -1,2 +1,7 @@
export ENTRYPOINT_VERSION=v1 export ENTRYPOINT_VERSION=v1
export MATTERMOST_CONFIG_VERSION=v1 export MATTERMOST_CONFIG_VERSION=v1
reset_config() {
cp /config-to-copy.json /mattermost/config/config.json && touch /mattermost/config/CoopCloudManaged
kill 8
}

View File

@ -2,10 +2,19 @@ version: "3.8"
services: services:
app: app:
configs:
- source: mattermost_config
target: /config-to-copy.json
secrets: secrets:
- smtp_pass - smtp_pass
secrets: secrets:
smtp_pass: smtp_pass:
external: true external: true
name: ${STACK_NAME}_smtp_pass_${SECRET_SMTP_PASS_VERSION} name: ${STACK_NAME}_smtp_pass_${SECRET_SMTP_PASS_VERSION}
configs:
mattermost_config:
name: ${STACK_NAME}_mattermost_config_${MATTERMOST_CONFIG_VERSION}
file: ./config.json.tmpl
template_driver: golang