Single database multiple apps

I’m not sure what the proper category for this question is, so admins, feel free to move it as needed.

I’ve been looking at the SSO stuff, but assuming that issue is successfully resolved, are there any issues with sharing db content between Discourse and the main app? In my particular case, my main site is a Python 3 install at Heroku. It uses a postgresql database, and Redis is available, but I know almost nothing about Ruby or Docker, so:

  1. Can the Python app read and access data written to the db by Ruby/Discourse, and vice versa?

  2. My preference would be to install Discourse on Heroku with my main app. Judging from my brief tour of meta.discourse so far, however, that may not be a slam dunk. So, if I follow the recommendation to use Digital Ocean, what [in addition to question 1] issues should I be aware of in wanting to integrate the two sites into a seamless user experience?

  3. Thanks so much in advance for your advice. I’ve been impressed with Discourse so far. I hope I can make it work for me.

ps - I don’t suppose anyone is working on a port of Discourse to Python 3, just to make my life easier? I looked but didn’t see such a project…

Yes, but the DB schema changes, the APIs not so much, so you are better using the many API endpoints.

A seamless user experience is, in most cases, having matching color schemas, same fonts, a matching header and links between the two sites. They don’t need to be on the same server for that.



That’s not going to happen. But you can do whatever you need with the API, so it wouldn’t really make your life much easier. You definitely don’t want to be interacting directly with the database. No good can come from that.

It might make your life easier to have a Python library that interfaced with the API, but even that’s likely overkill for your purposes.

1 Like

There’s been a couple different efforts to create a Python API for Discourse, have a look at these: