From 00f617afd27f3a707cb4b179c9f741d043b04083 Mon Sep 17 00:00:00 2001 From: Abel Luck Date: Thu, 1 Dec 2022 16:56:55 +0000 Subject: [PATCH] Update README usage --- README.md | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 8a9a6a9..4ac94f5 100644 --- a/README.md +++ b/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 ```