my problem is that when i'm trying to deploy Django app on heroku, i get that H10 error, and obviously cant access the site. heroku logs --tail dont show anything specific beside that H10 error code
at=error code=H10 desc="App crashed" method=GET
My Procfile is loading web processes, so it's in the right place i guess, but i belive that maybe configuration of that web process is wrong. I had a problem with H14 error which was caused, because i had Procfile in wrong directory. It was directory of the project where manage.py file is sitting. I had to move it one directory above, because it was root file of my repository(.git file was sitting there). This is my Procfile:
web: gunicorn api_project.wsgi
My directory tree is like:
ROOT/
├─ .git/
├─ Procfile
├─ api_project/
│ ├─ api_project/
│ ├─ manage.py
│ ├─ robots.txt
├─ .gitignore
And wsgi file is inside that send api_project dir. Maybe the path inside the Procfile should be diffrent?
If someone in future will have the same problem that i had right there, then the reason was wrong directory configuration in Procfile. You have to add something to your web process which is:
web: gunicorn --pythonpath <name of dir that contains your project folder> <actual dir that contains wsgi file>.wsgi
In my case it was:
web: gunicorn --pythonpath api_project api_project.wsgi
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.