What IS Heroku

Short introduction to HEROKU

HEROKU is a popular Platform-as-a-Service provider (PaaS) which makes it easy for developers to deploy apps in different technologies and frameworks using a short learning curve. The platform support all major languages like Python, Ruby, Java, PHP, and popular frameworks: Flask, Django, Express.

To use effectively HEROKU we need to install the CLI, the command line interface that helps us to interact with the deployment platform.

How to start

  • Create a FREE account on HEROKUarrow-up-right platform

  • Install the Heroku CLIarrow-up-right that match your OS: Mac, Unix, or Windows

  • Open a terminal window and authenticate via HEROKU login command:

    • Type in terminal heroku login. This will open a new browser window where the LOGIN action must be confirmed


HEROKU - Sign Up page

HEROKU - Sign Up page

HEROKU - Instal CLI

HEROKU - Instal CLI

After the installation is complete, open a terminal window and type heroku -v to check if HEROKU CLI is usable.

HEROKU Sample Deployment

We can see HEROKU in action by using two samples FREE apps provided by AppSeed - Flask Black Dashboardarrow-up-right. This popular Flask starter is provided with all assets required by HEROKU to be deployed in seconds. The relevant files:

Step #1 - Edit runtime.txt and specify the Python version to be used

Step #2 - Edit Procfilearrow-up-right, the HEROKU app bootstrapper

The above line instructs HEROKU to use the Gunicorn WSGI server to execute the WSGI app object, returned by run.pyarrow-up-right, located at the root of the project.

The gunicorn module must be also present in the requirements.txtarrow-up-right file, along with other modules required by the app.

With all configuration in place, we can start the deployment by typing a few lines in the terminal.

Step - #3 Clone the source code of target project

Step - #4 HEROKU Login - this will trigger a new browser window

Step - #5 Create the app in HEROKU platform

Step - #5 Compile the app in the HEROKU environment

Step - #6 Open the app in the browser

At this point, the sample app should be visible in the browser.

Flask Dashboard - Black Design, free starter coded in Flask by AppSeed.

HEROKU troubleshooting

  • First, make sure HEROKU CLI is accessible in the terminal. To check this type heroku -v in the terminal.

  • Make sure the commands are typed inside source code directory

  • heroku create used with an argument - Make sure that name is available in the HEROKU namespace.

HEROKU-ready apps

Starters provided by AppSeed are deployment-ready by default for many popular platforms - Docker, HEROKU and Gunicorn/Nginx.

Last updated