我是 Heroku 和 Gunicorn 的新手,所以我不确定这是如何工作的。但我做了一些搜索,我想我已经接近部署我的 Django 应用程序(1.5.1)了。所以我知道我需要一个 Procfile
web: gunicorn app.wsgi
因为我的目录有点不同。我无法在根目录中运行gunicorn
app_project
requirements/
contributors/
app/
app/
settings/
wsgi.py
# Normally Procfile goes here
Procfile
通常 app/ 是根目录,但我决定以这种方式构建我的文件夹,以将我的 django 应用程序与其他一些东西分开。由于我必须将 Procfile 放在根目录中才能让 heroku 识别它,所以我应该在 Procfile 中放入什么和/或应该在 Gunicorn 命令中放置哪些参数?
Note:
web: gunicorn app.wsgi # won't work because Procfile is in a directory above
# I also want to keep the directories as is
# I also don't want to create a secondary git inside the app folder just for heroku
web: gunicorn app.app.wsgi # won't work because I don't want to convert the folder into a python module
Try:
web: gunicorn --pythonpath app app.wsgi
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)