Mastodon Integration

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 个赞

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.

但是非开发者就没有办法实现吗?我想在 Mastodon 上分享我们的主题和评论。

这是否与您在这里讨论的是同一个问题,还是我弄错了?