# Discourse Integration with other Ruby Application

**URL:** https://meta.discourse.org/t/discourse-integration-with-other-ruby-application/58944
**Category:** Self-hosting
**Created:** [March 12, 2017, 10:49pm UTC](https://meta.discourse.org/t/discourse-integration-with-other-ruby-application/58944 "2017-03-12T22:49:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Mike\_Jenkins](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mike_jenkins/32/69122_2.png) [@Mike\_Jenkins](https://meta.discourse.org/u/Mike_Jenkins)
#### Post date: [March 12, 2017, 10:49pm UTC](https://meta.discourse.org/t/discourse-integration-with-other-ruby-application/58944/1 "2017-03-12T22:49:32Z")

</div>

Hi,

I am starting work on a Ruby app that will be deployed at [domain.com](http://domain.com). Discourse will be deployed at [subdomain.domain.com](http://subdomain.domain.com).

I’m just wondering what the best convention is, in regards to [domain.com](http://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!

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [March 12, 2017, 11:22pm UTC](https://meta.discourse.org/t/discourse-integration-with-other-ruby-application/58944/2 "2017-03-12T23:22:07Z")

</div>

> [@Mike\_Jenkins](#):
>
> I’m just wondering what the best convention is, in regards to [domain.com](http://domain.com) having access to our users.

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

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 13, 2017, 1:48am UTC](https://meta.discourse.org/t/discourse-integration-with-other-ruby-application/58944/3 "2017-03-13T01:48:19Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 13, 2017, 4:26am UTC](https://meta.discourse.org/t/discourse-integration-with-other-ruby-application/58944/4 "2017-03-13T04:26:18Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 13, 2017, 3:37pm UTC](https://meta.discourse.org/t/discourse-integration-with-other-ruby-application/58944/5 "2017-03-13T15:37:17Z")

</div>

My point was with two machines [x.example.com](http://x.example.com) and [example.com](http://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

```
