Развертывание Heroku Django прошло успешно, но в URL приложения отображается «Ошибка приложения» - PullRequest
0 голосов
/ 06 марта 2019

Я могу развернуть, чтобы создать и развернуть приложение Django на Heroku.Мое приложение работает локально.Но когда я запускаю heroku open, я получаю сообщение об ошибке по умолчанию

 An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. 

wsgi.py

import os

from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "allistic_server.settings")

application = get_wsgi_application()
application = DjangoWhiteNoise(application)

Procfile

web:gunicorn server.wsgi --log-file

needs.txt

Django==2.0.8
djangorestframework==3.9.1
gunicorn==19.7.2
whitenoise==3.6

Герои бревен - хвост

2019-03-05T19:14:22.539357+00:00 heroku[run.5495]: Awaiting client
2019-03-05T19:14:22.621479+00:00 heroku[run.5495]: Starting process with command `python3 manage.py migrate`
2019-03-05T19:14:30.032541+00:00 heroku[run.5495]: State changed from up to complete
2019-03-05T19:14:30.012744+00:00 heroku[run.5495]: Process exited with status 0
2019-03-05T19:14:32.734812+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=allistic-server.herokuapp.com request_id=8ad9d0a4-c449-4d43-8c0d-dbca27057c15 fwd="1.186.161.14" dyno= connect= service= status=503 bytes= protocol=https
2019-03-06T03:48:06.561682+00:00 app[api]: Starting process with command `bash` by user nedheesh.hasija@gmail.com
2019-03-06T03:48:12.189344+00:00 heroku[run.5469]: Awaiting client
2019-03-06T03:48:12.352258+00:00 heroku[run.5469]: State changed from starting to up
2019-03-06T03:48:42.200755+00:00 heroku[run.5469]: State changed from up to complete
2019-03-06T03:48:42.208643+00:00 heroku[run.5469]: Error R13 (Attach error) -> Failed to attach to process
2019-03-06T03:48:42.208643+00:00 heroku[run.5469]: Process exited with status 128
2019-03-06T03:49:06.415742+00:00 app[api]: Starting process with command `python3 manage.py makemigrations server` by user nedheesh.hasija@gmail.com
2019-03-06T03:49:11.116008+00:00 heroku[run.8566]: State changed from starting to up
2019-03-06T03:49:10.945200+00:00 heroku[run.8566]: Awaiting client
2019-03-06T03:49:10.978874+00:00 heroku[run.8566]: Starting process with command `python3 manage.py makemigrations server`
2019-03-06T03:49:15.768377+00:00 heroku[run.8566]: State changed from up to complete
2019-03-06T03:49:15.755742+00:00 heroku[run.8566]: Process exited with status 0
2019-03-06T03:49:27.418851+00:00 app[api]: Starting process with command `python3 manage.py migrate` by user nedheesh.hasija@gmail.com
2019-03-06T03:49:32.142089+00:00 heroku[run.4691]: Awaiting client
2019-03-06T03:49:32.162472+00:00 heroku[run.4691]: Starting process with command `python3 manage.py migrate`
2019-03-06T03:49:32.288884+00:00 heroku[run.4691]: State changed from starting to up
2019-03-06T03:49:37.323528+00:00 heroku[run.4691]: State changed from up to complete
2019-03-06T03:49:37.313173+00:00 heroku[run.4691]: Process exited with status 0
2019-03-06T03:50:31.399736+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=allistic-server.herokuapp.com request_id=626bda41-2cdc-44ce-95f1-f06440bb84a8 fwd="1.186.161.14" dyno= connect= service= status=503 bytes= protocol=https
2019-03-06T03:50:31.727399+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=allistic-server.herokuapp.com request_id=c1ea577e-a38f-487b-bf0a-557d1494155f fwd="1.186.161.14" dyno= connect= service= status=503 bytes= protocol=https
2019-03-06T03:50:31.732747+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=allistic-server.herokuapp.com request_id=00a45ba6-bf19-4a9f-8ce2-f41e585ae165 fwd="1.186.161.14" dyno= connect= service= status=503 bytes= protocol=https

1 Ответ

0 голосов
/ 06 марта 2019
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "allistic_server.settings")

Я вижу, что ваш проект называется allistic_server, но в procfile вы упомянули 'server.wsgi', который не является допустимым путем. Изменить это

web:gunicorn server.wsgi --log-file

до

web:gunicorn allistic_server.wsgi --log-file
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...