Add requirements.txt #1
13
README.md
13
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 -<APP-NAME> ./path/to/your/local/requirements.txt app:/tmp/
|
||||
abra app cmd <APP-NAME> 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`
|
||||
|
||||
|
||||
5
abra.sh
5
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
|
||||
}
|
||||
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user