Reputation: 339
I'm trying to migrate a basic Python blog / website to Heroku to deploy it to the internet. I'm partially through the process and am having trouble getting the Procfile correct. I am following the instructions shown here for Heroku.
"Mysite" is the top level directory of my site. I've placed the virtualenv within it, per the instuctions.
I'm not sure where the Procfile needs to go - here's the error I'm running into:
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.
I've attempted placing the Procfile several different places, but haven't had any luck eliminating the error.
The Procfile I'm using has the following contents:
web: gunicorn mysite.wsgi --log-file -
The file directory is as follows:
andre/
-Documents/
-Desktop/
-AppData/
-Local/
-heroku/
-mysite/
-blog/
-mysite/
-venv/
-db.sqlite3
-manage.py
-Procfile
-requirements.txt
Any suggestions on what I might be doing wrong here? Thank you.
Upvotes: 4
Views: 2606
Reputation: 136880
Move it up one directory to the root of your repository, and remove the .txt
extension. From the documentation:
A Procfile is a file named
Procfile
. It should be namedProcfile
exactly, and not anything else. For example,Procfile.txt
is not valid. The file should be a simple text file.The file must be placed in the root directory of your application. It will not function if placed in a subdirectory.
This documentation applies to all languages supported by Heroku. When the documentation says "the root of your application" it refers to the root directory, not a Django app.
Upvotes: 4