Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 929 Bytes

heroku-deploy.md

File metadata and controls

50 lines (34 loc) · 929 Bytes

Deploying to heroku

Setup

Login to the heroku command line interface as described here.

Create the app in heroku

heroku apps:create NAME_OF_APP

Uvicorn configuration

In production we run uvicorn via gunicorn with gunicorn -k uvicorn.workers.UvicornWorker.

Heroku recommends controlling the concurrency with the WEB_CONCURRENCY environment variable:

heroku config:set WEB_CONCURRENCY=3

Create a database

heroku addons:create heroku-postgresql:hobby-dev

Deploy code

git push heroku master

Ensure at least one instance is running

heroku ps:scale web=1

Check the application is running with:

heroku open

Import the data

heroku run python covidapi/import_data.py