port matrix-ops-bot to uv and nix flake module

This commit is contained in:
Abel Luck 2026-03-05 15:55:47 +01:00
parent c13d5fc536
commit 3a042155af
17 changed files with 2402 additions and 3476 deletions

View file

@ -18,7 +18,7 @@ See [config.json.sample](config.json.sample) for a sample config file.
Once you have a basic config (leave the routing_keys an empty list), you can easily add new webhooks with
```console
$ poetry run config add-hook --name my-hook-name --hook-type gitlab --room-id '!abcd1234:matrix.org'
$ uv run config add-hook --name my-hook-name --hook-type gitlab --room-id '!abcd1234:matrix.org'
Hook added successfully
@ -31,40 +31,11 @@ The secret token is:
Note: Register your bot user manually. This program does not register a new
user. You must also accept invitations to join the room automatically.
```
docker run --rm \
--name ops-bot \
--volume /path/to/data:/data:rw \
--volume /path/to/config:/config:ro \
registry.gitlab.com/guardianproject-ops/matrix-ops-bot:main
```
or docker-compose:
```yaml
version: "3.8"
services:
bot:
image: registry.gitlab.com/guardianproject-ops/matrix-ops-bot:main
user: "1000"
ports:
- "0.0.0.0:1111:1111"
volumes:
- /home/admin/bot/data:/data:rw
- /home/admin/bot/config:/config:ro
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "3"
```
## Dev Setup
```
poetry install
poetry run start
uv sync --group dev
uv run start
```
## License