Samuel Philipp
1956c874f3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
|
||
---|---|---|
.gitignore | ||
.woodpecker.yml | ||
cron | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
renovate.json |
feed2toot-docker
A Docker image for feed2toot.
Usage
Create a feed2toot
directory and your custom feed2toot.ini
with the feed2toot config in this directory. You can use the path /feed2toot
in that file, as the directory will be mounted to that path.
Example:
[mastodon]
instance_url=<mastodon-url>
; Here you need the two files created by register_feed2toot_app
user_credentials=/feed2toot/feed2toot_usercred.txt
client_credentials=/feed2toot/feed2toot_clientcred.txt
; Default visibility is public, but you can override it:
; toot_visibility=unlisted
[cache]
cachefile=/feed2toot/feed2toot.db
cache_limit=10000
[lock]
lock_file=/feed2toot/feed2toot.lock
lock_timeout=300
[rss]
uri=<rss-url>
; uri_list=/feed2toot/rsslist.txt
toot={title} {summary:400}
[hashtaglist]
; several_words_hashtags_list=/feed2toot/hashtags.txt
[feedparser]
accept_bozo_exceptions=true
[media]
; custom=/feed2toot/media/logo.png
To create the authorization for feed2toot you can also use this image:
docker run --rm -it -v /your/path/feed2toot:/feed2toot samuelph/feed2toot register_feed2toot_app
Finally copy the cron
file in the feed2toot
directory and run the docker image:
docker run -d -v /your/path/feed2toot:/feed2toot samuelph/feed2toot
Optionally you can adjust the cron job to fit your needs by editing the cron
file. Per default the cron job runs every minute.
To run the image with Docker Compose you can just use this:
services:
feed2toot:
image: samuelph/feed2toot
restart: always
volumes:
- /your/path/feed2toot:/feed2toot
Usage with multiple feeds
You can also use a single container to handle multiple feeds. Therefore you should create a folder for each feed in the feed2toot
folder from above. Don't forget to update the paths in the *.ini
files. Finally you can add a cronjob for each feed in the cron
file:
*/3 * * * * /usr/local/bin/feed2toot -c /feed2toot/feed1/feed2toot.ini > /proc/1/fd/1 2>/proc/1/fd/2
*/7 * * * * /usr/local/bin/feed2toot -c /feed2toot/feed2/feed2toot.ini > /proc/1/fd/1 2>/proc/1/fd/2
Now you can run the image like before.
License
feed2toot-docker is Free Software: It is licensed under GNU GPL v3 (See LICENSE for more information).