こんにちは、Onemonth DjangoでDjangoを学んでいます。Web アプリを heroku にデプロイしていますが、以下のエラーが発生しました。
heroku[router]: at=error code=H14 desc="No web processes running"
これを修正しようとしましheroku ps:scale web=1
たが、以下の結果になりました。
Scaling dynos... failed
! No such process type web defined in Procfile.
誰かがこれを修正する方法を手伝ってもらえますか? 仮想環境を作るためにcondaを使用していますが、これを引き起こす可能性はありますか?
私のプロフィール:
web: gunicorn myapp.wsgi --log-file -
git push heroku master
正常に実行されました。OSX Yosemite/Django 1.82 を使用しています。
プロジェクトの構造は以下のようになります。
Procfile
requirements.txt
core
- views.py
- __init__.py
- admin.py
- migrations
- models.py
- tests.py
- urls.py
- manage.py
nomadscoffee
- wsgi.py
- __init__.py
- settings.py
- urls.py
static
- css
- font-awesome
- img
- fonts
- index.html
- js
- less
- LICENSE
- mail
- README.md
templates
- base
- index.html
heroku にログオンします。
-----> Python app detected
-----> Installing runtime (python-2.7.10)
-----> Installing dependencies with pip
Collecting dj-database-url==0.3.0 (from -r requirements.txt (line 1))
Downloading dj_database_url-0.3.0-py2.py3-none-any.whl
Collecting dj-static==0.0.6 (from -r requirements.txt (line 2))
Downloading dj-static-0.0.6.tar.gz
Collecting Django==1.8.2 (from -r requirements.txt (line 3))
Downloading Django-1.8.2-py2.py3-none-any.whl (6.2MB)
Collecting django-toolbelt==0.0.1 (from -r requirements.txt (line 4))
Downloading django-toolbelt-0.0.1.tar.gz
Collecting gunicorn==19.3.0 (from -r requirements.txt (line 5))
Downloading gunicorn-19.3.0-py2.py3-none-any.whl (110kB)
Collecting psycopg2==2.6.1 (from -r requirements.txt (line 6))
Downloading psycopg2-2.6.1.tar.gz (371kB)
Collecting static3==0.6.1 (from -r requirements.txt (line 7))
Downloading static3-0.6.1.tar.gz
Installing collected packages: dj-database-url, static3, dj-static, Django, psycopg2, gunicorn, django-toolbelt
Running setup.py install for static3
Running setup.py install for dj-static
Running setup.py install for psycopg2
Running setup.py install for django-toolbelt
Successfully installed Django-1.8.2 dj-database-url-0.3.0 dj-static-0.0.6 django-toolbelt-0.0.1 gunicorn-19.3.0 psycopg2-2.6.1 static3-0.6.1
You are using pip version 7.0.3, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
-----> Preparing static assets
Collectstatic configuration error. To debug, run:
$ heroku run python manage.py collectstatic --noinput
-----> Discovering process types
~ Mis-cased procfile detected; ignoring.
~ Rename it to Procfile to have it honored.
Procfile declares types -> (none)
-----> Compressing... done, 54.1MB
-----> Launching... done, v4
https://something.herokuapp.com/ deployed to Heroku