问题描述
我是新来的heroku和gunicorn,所以我不知道这是如何工作的。但我已经做了一些搜索,我想我接近部署我的Django应用程序(1.5.1)。所以我知道我需要一个Procfile,它有 web:gunicorn app.wsgi
因为我的目录有点不同我无法在根目录下运行枪手
app_project
要求/
贡献者/
app /
app /
settings /
wsgi.py
#通常Procfile到这里
Procfile
通常app /将是根目录,但我决定以这种方式构建我的文件夹,以将django应用程序与其他一些内容分开。因为我必须把Procfile放在根目录下,以供英雄识别,那我应该把Procfile和/或什么参数放在gunicorn命令中呢?
注意:
web:gunicorn app.wsgi#将无法正常工作,因为Procfile位于
以上的目录中#我也想保持目录是
#我也不想在应用程序文件夹中创建一个辅助git只是为了heroku
web:gunicorn app.app.wsgi#不会工作因为我不想将文件夹转换成一个python模块
尝试:
web:gunicorn --pythonpath app app.wsgi
I'm new to heroku and gunicorn so I'm not sure how this works. But I've done some searching and I think I'm close to deploying my Django app (1.5.1). So I know I need a Procfile which has
web: gunicorn app.wsgi
Because my directories are a bit different. I can't run gunicorn in the root directory
app_project
requirements/
contributors/
app/
app/
settings/
wsgi.py
# Normally Procfile goes here
Procfile
Normally app/ would be the root directory, but I decided to structure my folders this way to separate my django app from some other things. Since I have to put the Procfile in the root directory for heroku to recognize it, what should I put in the Procfile and/or what parameters should I place in the gunicorn command?
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
这篇关于如何修改Procfile以在Heroku的非标准文件夹中运行Gunicorn进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!