mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
add slacker
This commit is contained in:
parent
f5664d7f40
commit
4110b9fc87
@ -136,6 +136,7 @@ A collection of delicious docker recipes.
|
||||
- [x] samba :+1:
|
||||
- [x] samba-arm :+1:
|
||||
- [x] scrapyd :+1:
|
||||
- [x] slacker
|
||||
- [x] swarm-arm
|
||||
- [x] taskd
|
||||
- [x] tftpd
|
||||
|
15
slacker/Dockerfile
Normal file
15
slacker/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
#
|
||||
# Dockerfile for slacker
|
||||
#
|
||||
|
||||
FROM python:3.9-alpine
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache curl \
|
||||
&& pip install aiosmtpd atpublic pyslack pyyaml requests \
|
||||
&& cd /usr/local/lib/python3.9/site-packages/ \
|
||||
&& wget https://github.com/ont/slacker/raw/master/handler.py
|
||||
|
||||
EXPOSE 8025
|
||||
CMD ["aiosmtpd", "-n", "-l", "0.0.0.0:8025", "-c", "handler.MessageHandler"]
|
7
slacker/README.md
Normal file
7
slacker/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
slacker
|
||||
=======
|
||||
|
||||
[Slacker][1] is simple email-to-slack gateway. It support basic rules for routing
|
||||
messages to different slack channels from different bots.
|
||||
|
||||
[1]: https://github.com/ont/slacker
|
42
slacker/data/config.yml
Normal file
42
slacker/data/config.yml
Normal file
@ -0,0 +1,42 @@
|
||||
######
|
||||
# This is example of config file for slacker.
|
||||
# There are two sections:
|
||||
# * default: this is default options for sending message to slack.
|
||||
# * rules: list of rules for matching email message. Currently 'from',
|
||||
# 'to' and 'subject' fields are supported. Their values can be
|
||||
# regexp to match corresponding email field.
|
||||
#
|
||||
# Each rule in list tested in order. First matched rule is used to update
|
||||
# values from 'default' section with its 'options' subsection.
|
||||
######
|
||||
|
||||
default:
|
||||
channel: '#general'
|
||||
username: slacker
|
||||
icon_url: ''
|
||||
slack_token: xoxb-00000000000-aaaaaaaaaaaaaaaaaaaaaaaa
|
||||
debug: false
|
||||
format: "subject: %(subject)s; body: %(body)s" ## default slack message format
|
||||
|
||||
|
||||
rules:
|
||||
- name: Monit rule
|
||||
from: monit@.*
|
||||
|
||||
options:
|
||||
username: monit
|
||||
channel: '#monit'
|
||||
icon_url: 'https://bitbucket.org/tildeslash/monit/avatar/128'
|
||||
debug: false
|
||||
|
||||
|
||||
- name: Cron rule
|
||||
from: root@localhost
|
||||
subject: Cron.*
|
||||
|
||||
options:
|
||||
username: cron
|
||||
channel: '#cron'
|
||||
icon_url: ''
|
||||
debug: true ## will output full email with all headers
|
||||
format: "email body is: %(body)s" ## custom message format
|
11
slacker/docker-compose.yml
Normal file
11
slacker/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
slacker:
|
||||
image: vimagick/slacker
|
||||
ports:
|
||||
- "8025:8025"
|
||||
volumes:
|
||||
- ./data:/etc/slacker
|
||||
environment:
|
||||
- CONFIG=/etc/slacker/config.yml
|
||||
restart: unless-stopped
|
Loading…
Reference in New Issue
Block a user