Heroku Cheatsheet (Useful Heroku Commands Reference)

Posted by on Feb 15, 2012 in Geek, How To | One Comment

Basics

Update Command-line Tool
 heroku update
Help
 heroku help

Get Started

Create App
 heroku create --stack cedar [<appname>]
Deploy App
 git push heroku master
Open App in Web Browser
 heroku open

Useful Info About Your App

Basic App Info
 heroku info
View App Config
 heroku config
Show State of App
 heroku ps
Show App Logs
 heroku logs

Advanced (Run Tasks/Database/Scaling)

Run task on Heroku (i.e. Rake tasks)
 heroku run rake task:name
Pull/Push Database (Use with Caution! Potentially Destructive.)
 heroku db:pull
 heroku db:push
Scale Web Process
 heroku ps:scale web=1
Set timezone for app. (Use TZ time zones from here [wikipedia].)
 heroku config:add TZ=America/Vancouver

For more, see here: http://devcenter.heroku.com/categories/command-line

Bonus Tip!

Avoid Free App (1 Web Dyno) Idling

Install New Relic Addon (Free): http://addons.heroku.com/newrelic
And Configure: http://devcenter.heroku.com/articles/newrelic
And then setup Availability Monitoring in “Menu > Settings > Availability Monitoring”

Download PDF Version (heroku_cheatsheet.pdf)

View on Google Docs