From 231878bae037b9fb00c44eeb30b45cce42504e2a Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 3 Feb 2024 14:39:49 +0000 Subject: [PATCH] Update README.md --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/README.md b/README.md index 9c62a5e..b8181b1 100644 --- a/README.md +++ b/README.md @@ -1 +1,60 @@ +# Mjolnir Bot Container + +This container provides a deployment for the Mjolnir moderation bot, configured to interact with Matrix homeservers. It is built on a `matrixdotorg/mjolnir:latest` base and includes a custom startup script to ensure flexible configuration at runtime. + +## Container Image + +The image is available at `git.nixc.us/colin/mjolnir:production`. + +## Features + +- Automatic configuration file setup if not present. +- Customizable through environment variables. +- Integrated Sentry support for error tracking. +- Configured to listen on IP `0.0.0.0` for web interfaces. + +## Configuration + +The container can be customized using the following environment variables: + +- `HOME_SERVER_URL` (default: `https://matrix.org`): The homeserver URL Mjolnir will interact with. +- `RAW_HOME_SERVER_URL` (default: `https://matrix.org`): The URL Mjolnir uses to fetch events. +- `ACCESS_TOKEN` (default: `YOUR_TOKEN_HERE`): The Matrix access token for authentication. +- `PANTALAIMON_USE` (default: `false`): Whether to use Pantalaimon. +- `PANTALAIMON_USERNAME` (default: `mjolnir`): The username for Pantalaimon login. +- `PANTALAIMON_PASSWORD` (default: `your_password`): The password for Pantalaimon. +- `SENTRY_DSN`: The Sentry DSN for error tracking (if not set, Sentry integration is disabled). +- `SENTRY_TRACES_SAMPLE_RATE` (default: `0.5`): The sample rate for Sentry traces. +- `WEB_LISTEN_ADDRESS` (default: `0.0.0.0`): The IP address the web server listens on. + +## Running the Container + +To run the container with the default settings: + +```shell +docker run -d --name mjolnir \ + -e ACCESS_TOKEN='your_access_token_here' \ + git.nixc.us/colin/mjolnir:production +``` + +To customize the configuration, adjust the environment variables accordingly: + +``` +docker run -d --name mjolnir \ + -e HOME_SERVER_URL='https://your.homeserver.url' \ + -e RAW_HOME_SERVER_URL='https://your.raw.homeserver.url' \ + -e ACCESS_TOKEN='your_access_token_here' \ + -e PANTALAIMON_USE='true' \ + -e PANTALAIMON_USERNAME='your_username' \ + -e PANTALAIMON_PASSWORD='your_password' \ + -e SENTRY_DSN='your_sentry_dsn' \ + -e SENTRY_TRACES_SAMPLE_RATE='0.5' \ + -e WEB_LISTEN_ADDRESS='0.0.0.0' \ + git.nixc.us/colin/mjolnir:production +``` + +## Documentation +For more detailed documentation on configuring and running Mjolnir, visit the official Mjolnir GitHub repository. +https://github.com/matrix-org/mjolnir/blob/main/config/default.yaml +https://github.com/matrix-org/mjolnir/blob/main/docs/setup_docker.md \ No newline at end of file