diff --git a/README.md b/README.md index f7d6b59..d0bd646 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ A collection of delicious docker recipes. - [x] cadvisor - [x] casperjs :+1: - [x] collectd +- [x] errbot - [x] freeradius - [x] h2o - [x] httpbin :+1: diff --git a/errbot/Dockerfile b/errbot/Dockerfile new file mode 100644 index 0000000..4376e9e --- /dev/null +++ b/errbot/Dockerfile @@ -0,0 +1,35 @@ +# +# Dockerfile for errbot +# + +FROM alpine +MAINTAINER kev + +RUN set -xe \ + && apk add --no-cache build-base \ + libffi-dev \ + openssl-dev \ + python3 \ + python3-dev \ + && pip3 install errbot \ + hypchat \ + irc \ + pyasn1 \ + pyasn1-modules \ + python-telegram-bot \ + slackclient \ + sleekxmpp \ + && adduser -s /bin/sh -D errbot \ + && cd /home/errbot \ + && wget http://errbot.io/en/latest/_downloads/config-template.py \ + && apk del --purge build-base \ + libffi-dev \ + openssl-dev \ + python3-dev + +USER errbot +WORKDIR /home/errbot +RUN errbot --init +VOLUME /home/errbot + +ENTRYPOINT ["errbot"] diff --git a/errbot/README.md b/errbot/README.md new file mode 100644 index 0000000..ef4e956 --- /dev/null +++ b/errbot/README.md @@ -0,0 +1,42 @@ +errbot +====== + +![](http://errbot.io/en/latest/_static/errbot.png) + +[Errbot][1] is a chatbot, a daemon that connects to your favorite chat service +and brings your tools into the conversation. + +## docker-compose.yml + +```yaml +errbot: + image: vimagick/errbot + volumes: + - ./data:/home/errbot + tty: yes + restart: always +``` + +## up and running + +```bash +$ mkdir -m 777 data +$ docker-compose run --rm errbot --init +$ vim data/config.py +$ docker-compose up -d +``` + +## chat-ops + +``` +master [8:50 PM] !tryme +errbot [8:50 PM] It works! + +master [8:50 PM] !help +errbot [8:50 PM] All commands ... + +master [8:55 PM] !uptime +errbot [8:55 PM] I've been up for 6 minutes +``` + +[1]: http://errbot.io diff --git a/errbot/data/config.py b/errbot/data/config.py new file mode 100644 index 0000000..de48e32 --- /dev/null +++ b/errbot/data/config.py @@ -0,0 +1,22 @@ +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 + +BACKEND = 'Slack' + +BOT_IDENTITY = { + 'token': 'xoxb-xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx' +} + +CHATROOM_FN = 'Errbot' + +BOT_DATA_DIR = r'/home/errbot/data' +BOT_EXTRA_PLUGIN_DIR = '/home/errbot/plugins' + +BOT_LOG_FILE = r'/home/errbot/errbot.log' +BOT_LOG_LEVEL = logging.DEBUG + +BOT_ADMINS = ('CHANGE ME', ) diff --git a/errbot/docker-compose.yml b/errbot/docker-compose.yml new file mode 100644 index 0000000..37548aa --- /dev/null +++ b/errbot/docker-compose.yml @@ -0,0 +1,6 @@ +errbot: + image: vimagick/errbot + volumes: + - ./data:/home/errbot + tty: yes + restart: always