From 105a43a0174bdab63ab13de500414e7465f77e2e Mon Sep 17 00:00:00 2001 From: Joerg Elfring Date: Sun, 28 Jul 2019 15:05:21 +0200 Subject: [PATCH] feed-to-muc: ALL NEW! --- docker-compose.yaml | 4 ++++ feed-to-muc/Dockerfile | 22 ++++++++++++++++++++++ feed-to-muc/README.md | 31 +++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 feed-to-muc/Dockerfile create mode 100644 feed-to-muc/README.md diff --git a/docker-compose.yaml b/docker-compose.yaml index 4cb5d22..a8660a0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,6 +7,10 @@ services: build: ./aap image: elfrinjo/aap:latest + feed-to-muc: + build: ./feed-to-muc + image: elfrinjo/feed-to-muc:latest + prosody-0.11: build: ./prosody-0.11 image: elfrinjo/prosody-0.11:latest diff --git a/feed-to-muc/Dockerfile b/feed-to-muc/Dockerfile new file mode 100644 index 0000000..9108c22 --- /dev/null +++ b/feed-to-muc/Dockerfile @@ -0,0 +1,22 @@ +FROM golang:latest AS build-env + +RUN go get salsa.debian.org/mdosch-guest/feed-to-muc +RUN go install salsa.debian.org/mdosch-guest/feed-to-muc + + + +FROM alpine:latest + +RUN apk --no-cache add ca-certificates \ + && mkdir -p /.config/feed-to-muc \ + && mkdir /.cache \ + && chown nobody:nobody /.cache \ + && mkdir /lib64 \ + && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 + +COPY --from=build-env /go/bin/feed-to-muc / + +USER nobody + +CMD ["/feed-to-muc"] + diff --git a/feed-to-muc/README.md b/feed-to-muc/README.md new file mode 100644 index 0000000..cfeba6b --- /dev/null +++ b/feed-to-muc/README.md @@ -0,0 +1,31 @@ +## feed-to-muc: Bridge a rss-feed to a xmpp muc +Run Martin Doschs Feed-to-MUC bridge inside a docker container. +https://salsa.debian.org/mdosch-guest/feed-to-muc + +This image expects the following configuration file at `/.config/feed-to-muc/config.json` + +```json +{ +"ServerAddress": "example.com:5222", +"BotJid": "feedbot@example.com", +"Password": "ChangeThis!", +"Muc": "muc-to-feed@conference.example.com", +"MucNick": "feedbot", +"Contact": "xmpp:botadmin@example.com", +"MaxArticles": 5, +"RefreshTime": 30, +"NoExcerpt": false, +"Quiet": false, +"Filter": [ "submitted by", "[link]" ], +"Feeds": [ "https://www.debian.org/News/news", + "https://www.debian.org/security/dsa-long", + "https://www.reddit.com/r/FDroidUpdates/new.rss" ] +} +``` + +## Usage +```console +# sudo docker run -d \ + -v /path/to/config.json:/.config/feed-to-muc/config.json + elfrinjo/feed-to-muc:latest +```