Reputation: 1242
I have a Rails app at example.com
, which is a Heroku app running under that domain. However, the marketing team would like something more dynamic to use to change the material on the main landing page.
My questions therefore are:
example.com
is one system, example.com/*
is the old Rails app)I've done these kinds of setups on custom servers. Just wandering whether it's possible to do this on Heroku.
Upvotes: 5
Views: 2171
Reputation: 176402
No you can't. Heroku allows to associate zero or more custom domains to the same app, but it's not possible to associate two apps with the same domain and somehow split the routing.
It's also very hard to have two different applications co-existing under the same umbrella. You can create more rack-based applications inside the same project and mount them under the same Rails router (for instance you can mount a Sinatra or Lotus application at a specific path in a Rails project).
You cannot write the apps in two different languages, because it's not possible to build a single Heroku app with two different buildpacks. Well, in theory, you can write your own buildpack... but it's not trivial.
The only viable solution is to have more Rack-based applications mounted under the same Rails or Rack router (you can have N Rack applications, 1 Rails and N Rack, but it's hardly possible to have N Rails).
Upvotes: 2