Update README usage
This commit is contained in:
parent
696b420ed3
commit
00f617afd2
1 changed files with 5 additions and 31 deletions
36
README.md
36
README.md
|
|
@ -30,19 +30,13 @@ 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 build -t registry.gitlab.com/guardianproject-ops/matrix-ops-bot .
|
||||
|
||||
```
|
||||
docker run --rm \
|
||||
--name ops-bot \
|
||||
--volume /path/to/store:/data \
|
||||
--env MATRIX_HOMESERVER=https://matrix.org \
|
||||
--env MATRIX_USER_ID=@YOURBOT:matrix.org \
|
||||
--env MATRIX_PASSWORD="changeme" \
|
||||
--env MATRIX_DEVICE_NAME=my-bot-server \
|
||||
--env BOT_ROUTING_KEYS="{\"room1\": \"!XXXX:matrix.org\", \"room2\": \"!YYYYY:matrix.org\"}" \
|
||||
--env BOT_BEARER_TOKEN="changeme" \
|
||||
registry.gitlab.com/guardianproject-ops/matrix-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:
|
||||
|
|
@ -52,19 +46,12 @@ 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
|
||||
- /home/admin/bot/config:/config:ro
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
|
|
@ -74,20 +61,7 @@ services:
|
|||
|
||||
## Dev Setup
|
||||
|
||||
`.env`:
|
||||
```
|
||||
MATRIX_HOMESERVER=https://matrix.org
|
||||
MATRIX_USER_ID=@YOURBOT:matrix.org
|
||||
MATRIX_PASSWORD="changeme"
|
||||
MATRIX_DEVICE_NAME=my-bot-server
|
||||
MATRIX_VERIFY_SSL=True
|
||||
MATRIX_STORE_PATH=/abs/path/to/persistent-store
|
||||
BOT_ROUTING_KEYS="{\"room1\": \"!XXXX:matrix.org\", \"room2\": \"!YYYYY:matrix.org\"}"
|
||||
BOT_BEARER_TOKEN="changeme"
|
||||
```
|
||||
|
||||
```
|
||||
source .env
|
||||
poetry install
|
||||
poetry run start
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue