views:

328

answers:

3

I've made 2 apps, App A and App B. App A's sole purpose is to allow users to sign up and App B's purpose is to take select users from App A email them. Since App A & B were created independently & are hosted in 2 separate Heroku instances, how can App B access the users database in App A? Is there a way to push certain relevant rows from App A to App B?

+4  A: 

There is currently no way of sharing databases between Heroku apps.

You might be able to use the Amazon RDS add-on to run a dedicated MySQL instance.

The alternative is going to be creating an API and pushing data between the apps. You can run a background process to push the data in and out.

Toby Hede
thanks Toby, I was thinking that an API would be the best way to go about creating this. Only problem is, I don't know how to create an API. Any good online guides?
Paul A.
Have a look at using ActiveResource - you can have your controllers accept and produce XML and then tie that to a model. Works really well.
Toby Hede
A: 

You might be able to do this if you use schemas with PostgreSQL.

Joshua D. Drake
A: 

Heroku actually overwrites the database.yml file that you have checked in, you can verify this by using the "heroku shell" command and typing cat config/databse.yml

They make up a bunch of random stuff that is used per application. I don't believe its possible to stop them from doing that.

Derek P.