Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

67 lines (37 sloc) 1.879 kb

Staging and production environments

We're using Heroku as a hosting provider. Deploying to Heroku is done via git. So, set up your git remotes for each environment:

git remote add staging
git remote add production


The following are mostly aliases from the dotfiles script.

To access your code on Heroku:


That will drop you into a Rails console for either environment. You can run ActiveRecord queries from there.

To dump staging or production data into your development environment:


You will see progress bars for each db index and table.

We can create a database backup at any time:


View backups:


To destroy a backup:

heroku pgbackups:destroy b003 --remote production

Transfer production data to staging:


More information in the Dev Center.

To check the status of running app servers, background jobs, cron jobs, etc:


To see the performance of the staging application, see:

To see the performance of the production application, see:

ENV variables

ENV variables like AWS keys should not be in the source code. They are configuration and should be stored as ENV variables. On Heroku, they are called "config variables." You can pull config variables using the heroku-config plugin that comes with the laptop script:

heroku config:pull --remote staging

You'll see the Amazon credentials as config vars. You should delete lines that don't apply, like Redis to Go connection strings.

Jump to Line
Something went wrong with that request. Please try again.