Im a newbie trying to make a django app, but unfortunately my os is windows. Heroku docs is written for linux so I cant get sufficient information for app development on windows 7. First how can I make procfile using window cmd? Is there any command language translation docs?(linux->windows)
Regarding creation of text file in cmd shell:
echo web: run this thing >Procfile
this will create Procfile
with web: run this thing
inside (obviously).
Also You can use any text editor, notepad
will fit perfectly.
And one thing, that wasn't obvious for me, therefore can also be helpfull to someone else.
Procfile should be a text file
is a bit misleading, do NOT save Procfile
as Procfile.txt
or it will not be recognised. Just leave it plain and simple Procfile
without any file format.
When you're using Windows for development, and your procfile contains for example $JAVA_OPTS (or anything else system dependent), then
- besides of
Procfile
with Linux syntax (with for example: $JAVA_OPTS), for Heroku, you need Procfile.windows
with Windows syntax (where you can write for example" %JAVA_OPTS%), and you point to it while working with Heroku localy:heroku local web -f procfile.windows
A Procfile should be a text file, called Procfile
, sitting in the root directory of your app.
It's the same for Windows or Linux or OS X.
It should specify the command Heroku should use to start your app - so it's not really about linux or windows.
So to answer your question: use a text editor. Any text editor.
Just create the file with name procfile
. If your editor is intelligent enough as mine to understand the files like procfile
have a Heroku
icon
gunicorn
doesn't work on Windows so you'll want a Procfile.windows that will locally host your app in a way that doesn't require gunicorn (such as the way you would normally do it).
web: ~what you would normally use to start your app~
web: gunicorn app_name.wsgi
write your own application name instead of app_name and file name just save without any Extention (Procfile).
A file named Procfile
is required in the root of your Heroku project. The following is a basic example of the content to be created for a Django project:
web: gunicorn your_app_name.wsgi --log-file
Here the full docs from Heroku.
© 2022 - 2024 — McMap. All rights reserved.