Hackbright Tech Talk @ Heroku

Hackbright Tech Talk @ Heroku

Heroku was fortunate enough to host Hackbright for lunch and a day of deploying their first apps to the web. Here's our slides from the day.

14ab78b0ee2996ed766eef60c7b36e9f?s=128

Dominic Dagradi

October 22, 2013
Tweet

Transcript

  1. Hackbright @ Heroku Oct 22, 2013

  2. Hi! I’m Dominic (I make web apps)

  3. What is Heroku?

  4. “Cloud application platform” “Forget servers.” “Deploy apps, the right way”

  5. We run your code FOR YOU

  6. How does your app work today?

  7. None
  8. All your data begins and ends its life on your

    computer 100% local
  9. bash environment python virtualenv [your code] [your database]

  10. Why isn’t this great?

  11. Sharing • No outside visitors • localhost goes away

  12. Scaling • Laptop is just 1 computer

  13. Stability • Software crashes • Laptop is only copy of

    data
  14. The Heroku way

  15. Many identical copies (dynos)

  16. Small sharp tools

  17. environment python your app environment python your app postgres your

    data add-on your data
  18. Use existing tools

  19. How to use it

  20. heroku create $ Creating hacking-brightly-42... done

  21. git push heroku master $ -----> Launching... done, v3 http://hacking-

    brightly-42.herokuapp.com deployed to Heroku
  22. What do you have to do?

  23. Not much! (Okay, maybe 3 things)

  24. Configuration create_engine(sqlite:///ratings.db) create_engine(os.environ['ENGINE_URL]))

  25. Configuration ENGINE_URL=sqlite:///ratings.db ADMIN_PASSWORD=mypassword ... .env

  26. Procfile web: gunicorn app:app worker: bin/work

  27. Procfile foreman start $ 11:33:41 web.1 | started with pid

    87156 11:33:41 worker.1 | started with pid 87157 ...
  28. Database sqlite:///ratings.db postgres://localhost/ratings

  29. And now...

  30. Let’s hack.

  31. 1. toolbelt.heroku.com 3. git push heroku master 2. heroku create

    0. Sign up at www.heroku.com