Configuring gunicorn for Django on Heroku

后端 未结 4 1018
梦毁少年i
梦毁少年i 2021-01-05 19:24

I\'m trying to setup a test Django project on Heroku. Following the advice here and in the Heroku Getting Started I\'m trying to use gunicorn instead of the Dj

4条回答
  •  暖寄归人
    2021-01-05 19:31

    I had this issue and landed up having to point directly to the python path and then set the settings reference.

    In the end my Procfile looks like this:

    web: gunicorn_django --pythonpath=/app/project --settings=settings
    

    I had to run heroku run which showed the env variables and that's where I was able to find the /app which I prepended to my project name.

提交回复
热议问题