Add docker-compose docs

This commit is contained in:
Abel Luck 2022-07-22 14:12:14 +00:00
parent 893982e0ad
commit f4a36a3ce7
2 changed files with 55 additions and 0 deletions

View file

@ -2,8 +2,14 @@
a bot for ops in matrix
Current features:
* Catch PagerDuty webhooks and forward them to a matrix room
## Usage
Note: Register your bot user manually. This program does not register a new user.
```
docker build -t registry.gitlab.com/guardianproject-ops/matrix-ops-bot .
@ -19,6 +25,33 @@ docker run --rm \
registry.gitlab.com/guardianproject-ops/matrix-ops-bot
```
or docker-compose:
```yaml
version: "3.8"
services:
bot:
image: registry.gitlab.com/guardianproject-ops/matrix-ops-bot:main
environment:
MATRIX_HOMESERVER: "https://matrix.org"
MATRIX_USER_ID: "@YOURBOT:matrix.org"
MATRIX_PASSWORD: "changeme"
MATRIX_DEVICE_NAME: "my-bot-server"
BOT_BEARER_TOKEN: "changeme"
BOT_ROUTING_KEYS: >
{"room1": "!XXXX:matrix.org", "room2": "!YYYYY:matrix.org"}
user: "1000"
ports:
- "0.0.0.0:1111:1111"
volumes:
- /home/admin/bot/data:/data:rw
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "3"
```
## Dev Setup
`.env`:

22
docker-compose.yml Normal file
View file

@ -0,0 +1,22 @@
version: "3.8"
services:
bot:
image: registry.gitlab.com/guardianproject-ops/matrix-ops-bot:main
environment:
MATRIX_HOMESERVER: "https://matrix.org"
MATRIX_USER_ID: "@YOURBOT:matrix.org"
MATRIX_PASSWORD: "changeme"
MATRIX_DEVICE_NAME: "my-bot-server"
BOT_BEARER_TOKEN: "changeme"
BOT_ROUTING_KEYS: >
{"room1": "!XXXX:matrix.org", "room2": "!YYYYY:matrix.org"}
user: "1000"
ports:
- "0.0.0.0:1111:1111"
volumes:
- /home/admin/bot/data:/data:rw
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "3"