我正在尝试将我的基本Django网站部署到Heroku上,但总是出错。我在根目录下有一个Procfile.txt和requirements.txt文件,但它总是给procfile丢失错误。
我的proc文件是:
web: gunicorn mysite.wsgi:application --log-file -
heroku ps:scale web=1
我的requirements.txt是:
Django==1.9.8
gunicorn
在生成日志中:
-----> Python app detected
! Warning: Your application is missing a Procfile. This file tells Heroku how to run your application.
! Learn more: https://devcenter.heroku.com/articles/procfile
-----> Uninstalling stale dependencies
Uninstalling virtualenv-15.0.2:
Successfully uninstalled virtualenv-15.0.2
$ pip install -r requirements.txt
Collecting gunicorn (from -r requirements.txt (line 2))
Downloading gunicorn-19.6.0-py2.py3-none-any.whl (114kB)
Installing collected packages: gunicorn
Successfully installed gunicorn-19.6.0
-----> Discovering process types
Procfile declares types -> (none)
-----> Compressing...
Done: 41.3M
-----> Launching...
Released v7
https://jpthoyo.herokuapp.com/ deployed to Heroku
如果这些信息不足以找到解决方案,请告诉我。谢谢
2条答案
按热度按时间l3zydbqr1#
该文件应仅命名为Procfile,而不是Procfile.txt。
5sxhfpxr2#
将Procfile命名为“Procfile”,不带任何扩展名,并确保它始终位于应用程序根文件夹中。因此,“Procfile.txt”无效,因为它的扩展名为“txt”。