title | category | layout | updated | description | intro |
---|---|---|---|---|---|
Heroku |
Devops |
2017/sheet |
2017-10-11 |
A one-page reference to common Heroku-CLI commands.
|
[Heroku](http://heroku.com/) is a web hosting platform supporting many languages, and this guide is a reference to Heroku's [command-line interface](http://heroku.com/).
|
heroku create sushi
git push heroku master
heroku access # List
heroku access:add [email protected]
heroku access:remove [email protected]
heroku apps:transfer [email protected]
heroku logs
heroku logs -t # --tail (stream)
heroku logs -s app # --source (only on app logs)
heroku releases
heroku releases:info v25
heroku rollback
heroku addons:add heroku-postgresql
heroku addons:add pgbackups:auto-month
See: Heroku PostgreSQL (devcenter.heroku.com)
heroku config # List
heroku config -s # List in shell format
heroku config:get KEY
heroku config:set KEY=val
heroku config:set KEY1=val KEY2=val ...
heroku config:unset KEY1
heroku apps # list
heroku apps:create [NAME]
heroku apps:destroy --app APP
heroku apps:info
heroku apps:open # open in browser
heroku apps:rename NEWNAME
heroku maintenance:on
heroku maintenance:off
heroku ps # list
heroku ps:scale web=1 # spawn more dynos
heroku restart
heroku run bash
heroku run console # Rails console
heroku run rake assets:precompile
heroku domains:add example.com
heroku domains:add www.example.com
heroku domains:clear
heroku domains:remove example.com
See: Custom domains (devcenter.heroku.com)
heroku addons:add wildcard_domains
*.yourdomain.com => heroku.com
Create an .htaccess
file in the webroot:
AuthUserFile /app/www/.htpasswd
AuthType Basic
AuthName "Restricted Access"
Require valid-user
Create a .htpasswd
file:
$ htpasswd -c .htpasswd [username]
See: gist.github.com