How to guides
Welcome to the How-to guides section of the Oreoweb documentation.How-to guides are like recipes: they guide you through the steps of solving key problems, such as implementing custom behavior.
Heroku deployment
In this guide, we will be looking at how to deploy a oreoweb application to Heroku. You can find the example code in the heroku-example repo
Setting things up
Oreoweb application
Let's assume you have the following app.py
script:
Procfile
The Procfile is a text file located in the root directory of your project which explicitly declares what command should be executed to start your app.
As described in Deployment, the following should fit most use cases:
requirements.txt
Heroku recognizes a Python app by the existence of requirements.txt
file in the root directory (see Python Dependencies via Pip). Here's an example of what yours may look like:
runtime.txt
runtime.txt
Place this file in the root directory with a specific Python version. Heroku will look at it to determine which Python version to use.
#Deploying via the Heroku CLI
Log into the Heroku CLI (you may need to install it on your machine):
Create the application on Heroku, e.g.:
Add the app's git remote:
Commit the changes, if any:
Deploy!
Once this is done, you can visit the newly deployed application using $ heroku open
.
Congrats! You've just deployed a Oreoweb application to Heroku. 🚀
Last updated