Couldn't find WSGI module deploying Heroku
Heroku expects Procfile
to be in the project root. It is easiest to deploy a Django app if manage.py
is in the project root as well. For example, if your project layout was:
├── db.sqlite3├── manage.py├── player├── radio│ ├── __init__.py│ ├── __pycache__│ ├── settings.py│ ├── urls.py│ └── wsgi.py├── setup.py├── static├── README.md├── .gitignore├── requirements.txt├── runtime.txt└── Procfile
then you can run:
web: gunicorn radio.wsgi
In your case, your Django project is in the radio
directoy. If you don't want to change the project layout, then you need to add radio
to the python path so that python imports work:
web: gunicorn --pythonpath radio radio.wsgi
After login from terminal using heroku login
by downloading Heroku CLI, you can deploy on heroku
using git
by following:
git initgit add .heroku create <app_name> --region <region_name>git commit -am "SOME MESSAGE"heroku config:set DEBUG_COLLECTSTATIC=1heroku ps:scale web=1 // (optional)git push heroku master
The ideal project structure shuold be like this...
radio ├── db.sqlite3 ├── manage.py ├── player ├── radio │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── setup.py ├── static ├── README.md ├── requirements.txt ├── runtime.txt └── Procfile