This is a CompSoc Service that runs an instance of MatterBridge to relay messages bidirectionally between the CompSoc central Discord server and the various SIG Discord servers.
The service is hosted on deployment-host
, as a Docker container. On every GitHub push, a Docker image is rebuilt and automatically triggers a re-deployment via a webhook.
The server/channel configuration is in the matterbridge.toml
file.
The bot token is not stored in this repository, please acquire it through other means.
All edits to the matterbridge TOML config except for the Token/secrets modification, can be done via commits and push -- the CI will take care of redeployment as long as there is an existing Docker container on the remote (i.e. someone ran make restart
once upon a time)
- Clone the repository
- (Make sure that there is at least one past GitHub action run -- we need at least one Docker image created.)
- Run
make initialise
to create a local.secrets
directory. Any remote secrets will be downloaded to local at this point. - Create a
.secrets/.env
file if it does not exist, containing the following:
MATTERBRIDGE_DISCORD_COMPSOC_TOKEN=<DISCORD BOT TOKEN>
MATTERBRIDGE_DISCORD_SIGINT_TOKEN=<DISCORD BOT TOKEN>
MATTERBRIDGE_DISCORD_GAMEDEVSIG_TOKEN=<DISCORD BOT TOKEN>
...etc
This file is passed as the --env-file
argument when starting the Docker container. MatterBridge will automatically treat them as the Token fields for the TOML config dicts like: [discord.compsoc]
- Run
make restart
, which will stop the remote service if running, sync the .env file to it, and start the remote service with the secrets.