Discourse Integration with other Ruby Application


I am starting work on a Ruby app that will be deployed at domain.com. Discourse will be deployed at subdomain.domain.com.

I’m just wondering what the best convention is, in regards to domain.com having access to our users.

I’m also developing locally. Would this mean I’d have to run two VM’s, one discourse and one my custom Rails app?

Keen to hear how others have configured, I’m sure there are many ways!

You want to investigate SSO (Single Sign-On). There’s a whole category for it on here.


It’s simpler to run two machines. With enough ram, you could set up some other web server in front of your two rails apps. You can find threads here about running Discourse and other things on the same host.

Two Docker containers is also fine. Does not need to be two machines necessarily.

My point was with two machines x.example.com and example.com one doesn’t need to configure Nginx (or caddy) as a front door to deal with directing traffic to the correct site. Discourse just gets by on a 1GB droplet, so you’d probably want to bump to a 2GB droplet, so there’s no fiscal advantage to having a single droplet, and the simplicity of not configuring two Rails apps and another web server is probably good advice to someone who’s not sure.

BUT if you’re talking about how to set up a dev box, where you don’t care if you’re accessing localhost:3000 and localhost:3001, then that’s a different question. You can just use the same local dev setup and set the port of one of the apps like this:

rails server -p 10524