Mastodon Integration

AI-generated summary

In a discussion titled ‘Mastodon Integration’ under the Feature category, hellekin explores integrating Mastodon with an existing Discourse multisite setup, aiming to reuse Discourse’s PostgreSQL and Redis containers instead of launching separate ones via Mastodon’s Docker images. They propose documenting the process and suggest additional features such as adding a user field for the local Mastodon instance, integrating Mastodon feeds into a Discourse category (possibly via an ATOM/RSS plugin or a dedicated Mastodon plugin), and enabling posting from Discourse to Mastodon. Falco suggests using Discourse’s web_only template and pointing it to existing Redis and PostgreSQL containers if Mastodon is run via docker-compose. hellekin clarifies their setup is the inverse — Discourse already running — and considers whether Mastodon’s Alpine-based images might be lighter despite the duplication. aldobelus asks if this integration is feasible for non-developers and whether it enables sharing themes and comments to Mastodon, questioning if it’s the same topic being discussed. The thread reflects early-stage exploration of technical integration, plugin needs, and usability for non-technical users.

Mastodon can be run from a docker image.

I wonder if someone here has set up Mastodon so it reuses the data and redis images from Discourse docker, or how to do it.

I wish we document it, since there’s no reason why running Mastodon from Docker would create extra instances for services that already come with Discourse. Therefore this post is set to evolve and integrate the step-by-step modifications to Mastodon install so that it can co-exist with an existing Discourse multisites install with separate containers for PostgreSQL and Redis.

Then it can also include extra documentation, such as:

  • adding a user field for the local Mastodon instance
  • integrating the local Mastodon instance feeds into a dedicated Discourse category, with a topic for each user feed (I see the autobot plugin may do that, but I’d rather use an ATOM/RSS specific plugin for that. Should we think about a dedicated Mastodon plugin?)
  • post from Discourse to Mastodon.
3 Likes

If you are running Mastodon using docker-compose, you can run Discourse using the web_only template and point to the existing redis and pg containers.

My situation is exactly inverse: I have a Discourse running, and want to install a Mastodon instance without relying on Mastodon’s db and redis images since I already have them with Discourse.

EDIT: maybe you’re right, since Mastodon docker images use Alpine, they may be lighter.

But there’s no way to do it for a non developer one? I would like to share our themes and comments at Mastodon.

Is it the same subject as you discussed here or maybe I’m mistaken?