💾 Archived View for gmi.bacardi55.io › blog › 2017 › 04 › 22 › running-feed2toot-in-a-docker-contain… captured on 2023-07-22 at 16:45:58. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Running feed2toot in a docker container

Posted on 2017-04-22

Introduction

Today, a very quick blog post on a how to install feed2toot[1] in a docker container. Feed2toot is a python application that will send toot on Mastodon for each item of an RSS feed.

1: https://gitlab.com/chaica/feed2toot

If you want to install Mastodon, I suggest you read here:

if you want to install feed2toot[5] in a container to be able to create toot from an RSS feed, then keep reading :).

2: https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Docker-Guide.md

3: https://hackernoon.com/deploying-mastodon-on-digital-ocean-f54b94c7f5b8

4: https://psychedeli.cat/mastodon/

5: https://gitlab.com/chaica/feed2toot

Create the docker image

Get the files

You can start with my repo as a base:

git clone https://git.bacardi55.org/bacardi55/docker-feed2toot.git

Build the container image

cd docker-feed2toot
docker build -t b55/feed2toot .

You can change the tag name :)

Configure feed2toot

the conf/feed2toot.ini, conf/rsslinks.txt and conf/hashtags.txt files as describe in the official documentation

The current release needs a hashtags file, even empty! It will become optional in the next release

Run

Get your credential first

Then, register your application with your mastodon account:

docker run --rm -v "$(pwd)"/conf:/etc/feed2toot -it b55/feed2toot register_feed2toot_app

It will ask your password (but won't save it) to generate token files.

Test the first run

docker run --rm -v "$(pwd)"/conf:/etc/feed2toot b55/feed2toot

Go to your user mastodon page, you should see the toot generated :)

Automate

To avoid launching the app manually, let's put a simple task in our crontab:

Open the crontab file: crontab -e and insert this line:

@hourly docker run --rm -v /path/to/conf:/etc/feed2toot b55/feed2toot

And you should be good to go!

/gemlog/

Send me a gemini mention

send me an email!