From fa37a10f2fd29f0c5a7895639ef0604bc445eb93 Mon Sep 17 00:00:00 2001 From: kev Date: Tue, 14 May 2024 18:15:03 +0800 Subject: [PATCH] update errbot --- errbot/Dockerfile | 12 +++--------- errbot/README.md | 14 +++++++------- errbot/data/config.py | 6 ++++-- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/errbot/Dockerfile b/errbot/Dockerfile index 295848a..726156e 100644 --- a/errbot/Dockerfile +++ b/errbot/Dockerfile @@ -12,17 +12,11 @@ RUN set -xe \ libffi-dev \ openssl \ openssl-dev \ + py3-pip \ python3 \ python3-dev \ - && pip3 install --no-cache-dir -U pip \ - && pip3 install --no-cache-dir errbot \ - hypchat \ - irc \ - pyasn1 \ - pyasn1-modules \ - python-telegram-bot \ - slackclient \ - sleekxmpp \ + && rm -f /usr/lib/python3.11/EXTERNALLY-MANAGED \ + && pip3 install --no-cache-dir 'errbot[slack,discord,mattermost,IRC,telegram,XMPP]' \ && adduser -s /bin/sh -h /opt/errbot -D errbot \ && apk del --purge build-base \ libffi-dev \ diff --git a/errbot/README.md b/errbot/README.md index 3572d48..6b8c084 100644 --- a/errbot/README.md +++ b/errbot/README.md @@ -6,28 +6,27 @@ errbot [Errbot][1] is a chatbot, a daemon that connects to your favorite chat service and brings your tools into the conversation. - ## up and running ```bash -$ mkdir -m 777 data +$ mkdir -m 777 -p data $ docker-compose run --rm errbot --init $ vim data/config.py $ docker-compose up -d $ docker-compose exec --user root errbot sh ->>> apk add -U py3-lxml +>>> apk add --no-cache py3-lxml >>> chmod 777 /usr/lib/python3.11/site-packages >>> chmod 777 /usr/lib/python3.11/site-packages/__pycache__ >>> exit ``` -Check the example config.py [here][2]. +Please read sample [config.py][2] and [setup][3]. ## chat-ops ``` -master [8:50 PM] !tryme -errbot [8:50 PM] It works! +master [8:50 PM] !about +errbot [8:50 PM] This is Errbot version 6.2.0 master [8:51 PM] !help errbot [8:51 PM] All commands ... @@ -86,4 +85,5 @@ errbot [8:56 PM] ``` [1]: http://errbot.io -[2]: http://errbot.io/en/latest/_downloads/config-template.py +[2]: https://github.com/errbotio/errbot/blob/master/errbot/config-template.py +[3]: https://errbot.readthedocs.io/en/latest/user_guide/setup.html diff --git a/errbot/data/config.py b/errbot/data/config.py index b849652..a68410e 100644 --- a/errbot/data/config.py +++ b/errbot/data/config.py @@ -3,7 +3,9 @@ import logging # This is a minimal configuration to get you started with the Text mode. # If you want to connect Errbot to chat services, checkout # the options in the more complete config-template.py from here: -# https://raw.githubusercontent.com/errbotio/errbot/master/errbot/config-template.py +# https://github.com/errbotio/errbot/blob/master/errbot/config-template.py +# Also see: +# https://errbot.readthedocs.io/en/latest/user_guide/setup.html BACKEND = 'SlackV3' @@ -20,6 +22,6 @@ BOT_EXTRA_PLUGIN_DIR = '/opt/errbot/plugins' BOT_LOG_FILE = '/opt/errbot/errbot.log' BOT_LOG_LEVEL = logging.DEBUG -BOT_ADMINS = ('@master', ) +BOT_ADMINS = ('@master',) AUTOINSTALL_DEPS = True