From c1a963022da829c77f645cefd22ed2c044fb2ec1 Mon Sep 17 00:00:00 2001 From: Linnea Date: Thu, 26 Feb 2026 22:05:59 -0800 Subject: [PATCH 1/2] helper function to use reminder bot --- abra.sh | 5 +++++ compose.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/abra.sh b/abra.sh index a88fdc9..434cca7 100644 --- a/abra.sh +++ b/abra.sh @@ -13,4 +13,9 @@ deploy_plugin () { assign_bot_user_via_sso () { mbc login -u $ADMIN_USER_NAME -p $(cat /run/secrets/admin_password) -s https://$DOMAIN -a $DOMAIN mbc auth -h $HOMESERVER_HOST --update-client --sso +} + +# Helper function to install extra requirements for the reminder bot: https://github.com/MxMarx/reminder +install_packages() { + pip install -r /tmp/requirements.txt --break-system-packages } \ No newline at end of file diff --git a/compose.yml b/compose.yml index 2ebc9c0..72c2316 100644 --- a/compose.yml +++ b/compose.yml @@ -15,6 +15,7 @@ services: volumes: - maubot_data:/data:rw + - maubot_pip:/usr/lib/python3.12/site-packages networks: - proxy configs: @@ -60,6 +61,7 @@ configs: volumes: maubot_data: + maubot_pip: secrets: admin_password: -- 2.49.0 From 349de9b1174062597841e72b456152a1f1a6b65c Mon Sep 17 00:00:00 2001 From: val Date: Thu, 12 Mar 2026 16:02:31 +0100 Subject: [PATCH 2/2] explain install_packages --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1cb444a..a67e4c8 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ You can install the cli locally or access it in the container: `abra app run $DOMAIN app sh` ### Deploy a plugin and create a bot user via abra scripts -Furthermore there are two useful scripts: +Furthermore there are useful scripts: ### 1. deploy plugin from git repro Most existing plugins are on github. Here you find links to the repos: https://plugins.mau.bot/ . @@ -54,7 +54,16 @@ This will show an url to sign in via ssh. After sso-login the user will be a bot Now you are ready to go to create an instance (i.e. a plugin connected to a bot user) via web interface. -### 3. plugin development +### 3. installing further needed dependencies +If the plugin you want to install has any further python-dependencies, you can manually install them by creating a `requirement.txt`, copying it to `/tmp` in the app container (eg. with `abra cp`) and run `install_packages` +``` +abra app cp - ./path/to/your/local/requirements.txt app:/tmp/ +abra app cmd app install_packages +``` + +pip (documentation [here](https://pip.pypa.io/en/stable/reference/requirements-file-format/)). The requirement.txt file can also specify module versions, which might be helpful for stability. https://pip.pypa.io/en/stable/reference/requirements-file-format/ + +### 4. plugin development Plugin / Bot development is quite straight forward. needed: `mbc` -- 2.49.0