sgimeno
sgimeno

Reputation: 1893

Procfile declares types -> (none) in Heroku

I'm stuck in running a Django 1.4 app on Heroku via Procfile. I've read all the related posts and I'm sure this is not a case sensitive related issue as I named correctly to Procfile. This is my project structure. Notice Procfile is at the same level that manage.py

.
├── README.md
├── docs
├── project
│   ├── Procfile
│   ├── client
│   │   ├── __init__.py
│   │   ├── __init__.pyc
│   │   ├── models.py
│   │   ├── templates
│   │   │   └── welcome.html
│   │   ├── tests.py
│   │   ├── views.py
│   │   └── views.pyc
│   ├── manage.py
│   └── wings
│       ├── __init__.py
│       ├── __init__.pyc
│       ├── settings.py
│       ├── settings.pyc
│       ├── urls.py
│       ├── urls.pyc
│       ├── wsgi.py
│       └── wsgi.pyc
├── requirements.txt
├── static
│   ├── css
│   ├── images
│   └── js
├── tests
└── uploads

Here is the Procfile:

web:python manage.py runserver

Here the output of foreman running it locally (works fine)

10:29:28 web.1     | started with pid 595

I'm getting this on the push to heroku:

Procfile declares types -> (none)

Trying to scale it via heroku toolbelt:

$ heroku ps:scale web=1 --app myapp
Scaling web processes... failed
!    Record not found.

I always create my apps via web, so I need always to put the --app argument. Might be any issue related to how I create my apps?

I also tried the following:

MacBook-Pro-de-Sergio:myapp sergio$ heroku run python project/manage.py runserver
Running `python project/manage.py runserver` attached to terminal... up, run.1
Validating models...

0 errors found
Django version 1.4, using settings 'wings.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

This are the logs of my app:

2012-07-18T09:18:51+00:00 heroku[run.1]: Starting process with command `python       project/manage.py runserver`
2012-07-18T09:18:51+00:00 heroku[run.1]: State changed from starting to up
2012-07-18T09:19:16+00:00 heroku[router]: Error H14 (No web processes running) -> GET peoplewings.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-07-18T09:19:16+00:00 heroku[router]: Error H14 (No web processes running) -> GET peoplewings.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=

Answer

As Neil pointed out Procfile should be in the root of git repo. I also had to set the host and port on Procfile as default web server points to 127.0.0.1:8000 which will not work on heroku

web: python project/manage.py runserver 0.0.0.0:$PORT

Upvotes: 2

Views: 4172

Answers (2)

thadk
thadk

Reputation: 1057

The space between the Record name and the contents seems to be important:

Use:

web: python manage.py runserver

and not

web:python manage.py runserver

Upvotes: 3

Neil Middleton
Neil Middleton

Reputation: 22238

Your Procfile needs to be in the root of your git repository that is pushed to Heroku.

Upvotes: 6

Related Questions