Monday, September 1, 2014

Push code to Heroku

Checklist for developers to push code to Heroku

  1. Developer needs to be added as collaborator for the heroku app.
  2. Developer needs to add the right heroku git repo in his project.
    1. git remote add heroku git@heroku.com:<app-name>.git
  3. git push heroku master (to push code to heroku git repo)
  4. heroku logs (to check the log entries, verify if the app crashed or running)
  5. To run python commands shell or syncdb use heroku run.
    1. heroku run python manage.py shell
    2. heroku run python manage.py syncdb
  6. To run SQL on Heroku
    1. heroku pg:psql
    2. cat magic.sql | heroku pg:psql (to run the SQL statements from magic.sql file)
  7. To capture url of backed up database (https://devcenter.heroku.com/articles/pgbackups)
    1. heroku pgbackups:url  
    2. refer to the link above for import/export of data.
  8. heroku's documentation is very good and saves us lot of effort 
    1. https://devcenter.heroku.com/


1 comment: