Question

I've built an app on heroku and we're getting close to going live. Right now I'm using the 'Shared Database 5MB' add-on and I can't find where to change to the production DB.

What other changes should I apply before going live? Is there a good tutorial on heroku or elsewhere? I couldn't find one yet.

Was it helpful?

Solution

Here you can find information about Production vs Development database plans.

Development vs. Production

Heroku offers you the choice of running a development or production database.

Heroku Postgres Dev databases

The Heroku Postgres dev plan has replaced the older shared database system. It runs Postgres 9.1 and offers almost complete feature parity with the production plans, but is intended for development and staging application.

Most new apps created on Heroku automatically have a dev database installed. See the troubleshooting section if DATABASE_URL is not defined in your app.

For more information read the Heroku Postgres Starter Tier article.

Heroku Postgres production databases

Production plans are suitable for production scale applications. In addition, the production databases offer a number of advantages over shared, including direct access (via psql or any native postgres library), stored procedures, and Postgres 9.1 support.

OTHER TIPS

I would recommend creating a parallel new Heroku project: one for development and one for production.

Your local git repository can have two remote git repository, one pointing to the development Heroku project and one pointing to production Heroku environment.

Then make a development branch from your code base. Push development branch to development project and push production from master branch.

When ever you are ready to push code to production merge development branch to master branch and then push to remote production Heroku project.

This will allow you to continue to development without impacting existing users.

I'd also recommend setting up one of the log and performance monitoring addons. Loggly lets you push your logs to S3 for free (well, the s3 storage isn't free, but the push is) if you want to pull old logs later.

You'll also want to setup monitoring for exceptions - the logentries addon is great for that.

New relic is the only performance monitoring addon that I know of and is slightly pricey.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top