Heroku Flashcards
What is the basic instance/container used in Heroku?
Dyno
All dynos are ___ instances
Amazon EC2
What are the 2 types of workers?
Web, worker
What is heroku good for?
Small scale web development
What are the pros of using heroku?
- Plug & play applications
- Full Git integration
- Docker integration
What are web processes dynos responsible for?
Serving the web app to the end client
What are worker processes dynos responsible for?
Non-web related work
What files are required to make a web app with Heroku?
- Procfile
- requirements.txt
- runtime.txt
- webapp.py
What does the runtime.txt file specify?
The language/runtime to use
What does the requirements.txt file specify?
Specifies modules/libraries to install in the environment
What does the Procfile specify?
Contains the command(s) we want to run when our application is deployed
What does the webapp.py file specify?
Web application code
What are the commands for deploying with Git?
git init
git add .
heroku create
git push heroku master
What do we need to use to have a persistent database?
PostgreSQL
How do we need to adjust our files to include PostgreSQL
requirements. txt: psycopg2
webapp. py: import psycopg2