# 📰 BlueMastoFeed – RSS zu Mastodon & Bluesky Poster **BlueMastoFeed** ist ein Docker-basiertes Tool, das regelmäßig einen RSS-Feed ausliest und neue Beiträge automatisch auf **Mastodon** und **Bluesky** veröffentlicht. ## Features - RSS-Feed regelmäßig auslesen - Postfilterung nach Alter (`MAX_POST_AGE_DAYS`) - Verhindert doppelte Posts mit Hilfe einer persistierten ID-Liste - Posten auf: - ✅ Mastodon - ✅ Bluesky - ✅ Beides (konfigurierbar über `.env`) - Optionaler E-Mail-Versand bei Erfolg oder Fehler - Healthcheck-Endpoint auf Port 8000 ## Voraussetzungen - Docker (Version **20.10** oder höher) - Zugangsdaten für Mastodon & Bluesky - Gültige RSS-Feed-URL ## Einrichtung für Produktivbetrieb ### 1. Datenverzeichnis auf dem Host erstellen ```bash mkdir -p /opt/bluemastofeed/data ``` ### 2. Container mit Umgebungsvariablen starten ```bash docker run -d \ --name bluemastofeed \ -e FEED_URL=https://example.com/rss.xml \ -e MASTODON_API_BASE_URL=https://mastodon.social \ -e MASTODON_ACCESS_TOKEN=your_mastodon_access_token \ -e BSKY_IDENTIFIER=your_handle.bsky.social \ -e BSKY_PASSWORD=your_bluesky_password \ -v /opt/bluemastofeed/data:/data \ dev.ksite.de/ralf.kirchner/bluemastofeed:latest ``` ## Einrichtung für Entwicklung ### 1. Repository klonen ```bash git clone https://dev.ksite.de/ralf.kirchner/BlueMastoFeed.git cd BlueMastoFeed ``` ### 2. `.env`-Datei erstellen Erstelle im Projektverzeichnis eine Datei namens `.env` mit folgendem Inhalt: ```env FEED_URL=https://example.com/rss.xml MASTODON_API_BASE_URL=https://mastodon.social MASTODON_ACCESS_TOKEN=your_mastodon_token BSKY_IDENTIFIER=your_bsky_handle BSKY_PASSWORD=your_bsky_password ``` ### 3. Docker-Image lokal bauen ```bash docker build -t bluemastofeed . ``` ### 4. Container starten ```bash docker run -d \ --name rss-poster \ --env-file .env \ -v $(pwd)/data:/data \ bluemastofeed ``` ## Umgebungsvariablen Die folgenden Umgebungsvariablen steuern das Verhalten des Containers. Sie können entweder direkt beim Start übergeben oder über eine `.env`-Datei definiert werden. | Variable | Beschreibung | Beispielwert | Standardwert | | ----------------------- | ------------------------------------------------------------ | -------------------------- | -------------- | | `FEED_URL` | URL zum RSS- oder Atom-Feed | `https://example.com/feed` | _erforderlich_ | | `MAX_POST_AGE_DAYS` | Maximales Alter eines Beitrags (in Tagen), der gepostet werden darf | `0` = nur heutige Beiträge | `0` | | `POST_TARGETS` | Zielplattform(en): `mastodon`, `bluesky`, `both` | `mastodon` = nur Mastodon | `both` | | `MASTODON_API_BASE_URL` | Basis-URL deiner Mastodon-Instanz | `https://mastodon.social` | _erforderlich_ | | `MASTODON_ACCESS_TOKEN` | Access Token für die Mastodon API | `abc123...` | _erforderlich_ | | `BSKY_IDENTIFIER` | Bluesky-Handle | `name.bsky.social` | _erforderlich_ | | `BSKY_PASSWORD` | Passwort für das Bluesky-Konto | `passwort123` | _erforderlich_ | | `INTERVAL_MINUTES` | Zeitintervall in Minuten zwischen den Feed-Prüfungen | `30` | `30` | | `EMAIL_MODE` | Wann eine Status-E-Mail gesendet werden soll (`none`, `errors`, `all`) | `errors` | `errors` | | `SMTP_HOST` | SMTP-Server für Status-E-Mails | `smtp.example.com` | _optional_ | | `SMTP_PORT` | Port des SMTP-Servers | `587` | `587` | | `SMTP_USER` | Benutzername für SMTP | `user@example.com` | _optional_ | | `SMTP_PASSWORD` | Passwort für SMTP | `sicherespasswort` | _optional_ | | `EMAIL_FROM` | Absenderadresse für E-Mails | `noreply@example.com` | _optional_ | | `EMAIL_TO` | Empfängeradresse für E-Mails | `admin@example.com` | _optional_ |