我是一个新手,对于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命令中应该放置哪些参数?
注意:
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