[英]Django app on Heroku, deployed successfully but could not be served
I have built a simple blog app with Django by following a video and deployed it to Heroku by following another video. 我通过跟踪视频使用Django构建了一个简单的博客应用,并通过跟踪另一个视频将其部署到了Heroku。 The app works fine locally, but it is not working online.
该应用程序在本地可以正常运行,但无法在线运行。 Heroku gives me this error message:
Heroku给了我这个错误信息:
This app has no process types yet 该应用还没有进程类型
Add a Procfile to your app in order to define its process types. 将Procfile添加到您的应用中以定义其进程类型。
I had already added a Proclife created with Notepad with these contents: 我已经添加了使用记事本创建的具有以下内容的Proclife:
web: gunicorn mysite.wsgi 网址:gunicorn mysite.wsgi
But how can I add another Procfile to an app already deployed to Heroku? 但是,如何向已部署到Heroku的应用程序中添加另一个Procfile? Where should I place it?
我应该放在哪里?
Yeah that's correct. 是的,没错。 It required file 'Procfile' in the project root directory.
它在项目根目录中需要文件“ Procfile”。 I have created one with below content
我用以下内容创建了一个
web: gunicorn <your-app.wsgi> -b 0.0.0.0:$PORT -w 10
And followed the below link https://devcenter.heroku.com/articles/procfile where everything is mentioned to deploy the code to heroku. 然后点击下面的链接https://devcenter.heroku.com/articles/procfile ,其中提到了将代码部署到heroku的所有内容。 Its been long time for me working with heroku that too with test app so I am not sure if it got changed after that.
对我来说,使用heroku和测试应用程序一起工作也已经很长时间了,所以我不确定在那之后它是否有所改变。 But I think just following the link will work just fine.
但是我认为仅遵循链接就可以了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.