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
|
Note: Register your bot user manually. This program does not register a new
|
||||||
user. You must also accept invitations to join the room automatically.
|
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 \
|
docker run --rm \
|
||||||
--name ops-bot \
|
--name ops-bot \
|
||||||
--volume /path/to/store:/data \
|
--volume /path/to/data:/data:rw \
|
||||||
--env MATRIX_HOMESERVER=https://matrix.org \
|
--volume /path/to/config:/config:ro \
|
||||||
--env MATRIX_USER_ID=@YOURBOT:matrix.org \
|
registry.gitlab.com/guardianproject-ops/matrix-ops-bot:main
|
||||||
--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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
or docker-compose:
|
or docker-compose:
|
||||||
|
|
@ -52,19 +46,12 @@ version: "3.8"
|
||||||
services:
|
services:
|
||||||
bot:
|
bot:
|
||||||
image: registry.gitlab.com/guardianproject-ops/matrix-ops-bot:main
|
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"
|
user: "1000"
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:1111:1111"
|
- "0.0.0.0:1111:1111"
|
||||||
volumes:
|
volumes:
|
||||||
- /home/admin/bot/data:/data:rw
|
- /home/admin/bot/data:/data:rw
|
||||||
|
- /home/admin/bot/config:/config:ro
|
||||||
logging:
|
logging:
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
options:
|
options:
|
||||||
|
|
@ -74,20 +61,7 @@ services:
|
||||||
|
|
||||||
## Dev Setup
|
## 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 install
|
||||||
poetry run start
|
poetry run start
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue