Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Procfile and Procfile.Windows in heroku servers

I'm learning how to deploy a Django project with Heroku.

And I notice two files in this repository (git from tutorial): https://github.com/heroku/python-getting-started

The file Procfile, I do understand what's for. However, the file Procfile.windows is something that I quite not understand.

Any help will be appreciated.

like image 551
Alvaro Joao Avatar asked Feb 23 '16 19:02

Alvaro Joao


2 Answers

I'm just starting and running into the same issue. I believe that some django packages e.g. gunicorn don't work on Windows.

That's why the Heroku example app comes pre-packed with a separate "Procfile.windows" that does not use gunicorn.

To use it, do

heroku local -f Procfile.windows

... now just to find out how to make it the default.

like image 126
ripper234 Avatar answered Nov 15 '22 02:11

ripper234


Procfile.windows is the file for Windows machine to run the application locally. Follow the steps below and try it out yourself:

  1. Create a file called Procfile.windows at the same level where manage.py resides.
  2. Add this inside the file: web: python manage.py runserver
  3. Run this in your cmd: heroku local web -f Procfile.windows or heroku local -f Procfile.windows

Also, you can follow the steps from the official Heroku website (https://devcenter.heroku.com/articles/deploying-python#build-your-app-and-run-it-locally). This is probably the better way to do it in my opinion.

like image 28
ian0411 Avatar answered Nov 15 '22 04:11

ian0411