0

I have created my first Django 2.0 project and trying to deploy it into Heroku.

I have have setup all and all push and pull goes well.

But when I access my application endpoint with

https://jotitdown.herokuapp.com

It is not loading and heroku logs gives this error

2017-12-23T07:04:45.333450+00:00 heroku[router]: 
at=error code=H10 desc="App crashed" method=GET path="/" 
host=jotitdown.herokuapp.com request_id=cd2a9bb6-fae8-4317-af39-b271c1d74af5 
fwd="45.115.107.34" dyno= connect= service= status=503 bytes= protocol=https

I have set this in settings.py, here `

DEBUG = True

ALLOWED_HOSTS = ['*', 'jotitdown.herokuapp.com', '*.herokuapp.com']

and Profile

web: gunicorn notepad.wsgi --log-file -

I tried running on local using

heroku local web

It gives error as

[WARN] No ENV file found
web.1   |  /bin/sh: gunicorn: command not found
web.1   Exited with exit code 127
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285

2 Answers2

0

Gunicorn isn't automatically provided by Heroku. Your local copy is clearly missing it, and I suspect it's missing on Heroku as well.

Add it to your requirements.txt and install it locally, then test with heroku local again. Assuming that works, commit that change to requirements.txt and push to Heroku again.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
0

Solved by removing all installed packages and reinstalling them all using Pipenv.

To start Heroku local web, if you are using virtual environment of pipenv you need to run following commands.

pipenv run heroku local web

This answer may help someone using pipenv.

Anuj TBE
  • 9,198
  • 27
  • 136
  • 285