My problem:
When using gunicorn as my WSGI HTTP server, the wizard cannot find the Django application (wsgi?).
Application structure:
In my Django application, I have things structured as follows:
<git_repository_root>/ <django_project_root>/ <configuration_root>/
<git_repository_root> contains project and deployment controls ( requirements.txt , Procfile , fabfile.py , etc.)
<django_project_root> contains my Django applications and application logic.
Finally, <configuration_root> contains my settings.py and wsgi.py
What I tried:
My Procfile should look like this (according to Heroku Docs ):
web: gunicorn myapp.wsgi
When starting foreman start with this project layout, I get an error message:
ImportError: Import by filename is not supported.
What works:
If I move my Procfile from <git_repository_root> to <git_repository_root> , it works locally. After clicking on Heroku (note: Heroku sees <git_repository_root> ), I cannot scale any worker / add processes. I get the following:
Scaling web dynos... failed ! No such process type web defined in Procfile.
I believe I want a Procfile in my <git_repository_root> anyway - so why doesn't it work? I also tried changing Procfile to: web: gunicorn myapp/myapp.wsgi
but no luck. Any help would be greatly appreciated!
source share