Deploying a Python Flask app on Heroku

John Kagga
Sep 28, 2017 · 5 min read

Let`s Get started

Heroku CLI

heroku login

The application

git clone https://github.com/jokamjohn/bucket_api_heroku.git
pip install -r requirements.txt

Adding a Procfile

pip install gunicorn
pip freeze > requirements.txt
web: gunicorn app:app

Deployment

heroku create kbucket-api-heroku
(venv) G:\PyProjects\bucket_api_heroku>heroku create kbucket-api-heroku
Creating kbucket-api-heroku... done
https://kbucket-api-heroku.herokuapp.com/ | https://git.heroku.com/kbucket-api-heroku.git
Homepage

Database

Dashboard overview
release: python manage.py db upgrade

Testing the application

API documentation and console
Successful user creation

The Andela Way

A pool of thoughts from the brilliant people at Andela

Thanks to Edmond Atto.

John Kagga

Written by

Andela |The Andela Way Editor | Arvana |Facebook Dev Circles| Long-life Learner

The Andela Way

A pool of thoughts from the brilliant people at Andela