【发布时间】:2016-03-06 17:32:21
【问题描述】:
我正在尝试将基本的 Python 博客/网站迁移到 Heroku 以将其部署到 Internet。我部分完成了该过程,并且无法正确获取 Procfile。我正在按照here for Heroku 显示的说明进行操作。
“Mysite”是我网站的顶级目录。按照说明,我已将 virtualenv 放入其中。
我不确定 Procfile 需要去哪里 - 这是我遇到的错误:
C:\Users\andre\mysite>virtualenv venv
Using base prefix 'c:\\users\\andre\\appdata\\local\\programs\\python\\python35-32'
New python executable in venv\Scripts\python.exe
Installing setuptools, pip, wheel...done.
C:\Users\andre\mysite>venv\Scripts\activate
(venv) C:\Users\andre\mysite>pip freeze > requirements.txt
You are using pip version 7.1.2, however version 8.1.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(venv) C:\Users\andre\mysite>pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): wheel==0.24.0 in c:\users\andre\mysite\venv\lib\site-packages (from -r requirements.txt (line 1))
You are using pip version 7.1.2, however version 8.1.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(venv) C:\Users\andre\mysite>heroku local web
ERROR: open Procfile: The system cannot find the file specified.
我尝试将 Procfile 放置在几个不同的位置,但没有任何运气可以消除错误。
我正在使用的 Procfile 有以下内容:
web: gunicorn mysite.wsgi --log-file -
文件目录如下:
andre/
-Documents/
-Desktop/
-AppData/
-Local/
-heroku/
-mysite/
-blog/
-mysite/
-venv/
-db.sqlite3
-manage.py
-Procfile
-requirements.txt
关于我在这里可能做错的任何建议?谢谢你。
【问题讨论】: