Skip to content

Instantly share code, notes, and snippets.

@jeffrydegrande
Created April 29, 2010 18:32
Show Gist options
  • Save jeffrydegrande/384013 to your computer and use it in GitHub Desktop.
Save jeffrydegrande/384013 to your computer and use it in GitHub Desktop.
# heroku: multiple accounts/multiple environments
check ~/.heroku => credentials
heroku config:add RACK_ENV=staging --app foo-staging
heroku config:add RACK_ENV=production --app foo-production
## Deploy and migrate
You'll be doing this next command pretty often. We push the current branch to the staging server's master branch. Since this is the first deploy we'll need to do the same thing for production and run all the migrations.
git push staging master
git push production master
heroku rake db:migrate --app foo-staging
heroku rake db:migrate --app foo-production
heroku open --app foo-staging
heroku open --app foo-production
always add --app
source: http://jqr.github.com/2009/04/25/deploying-multiple-environments-on-heroku.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment