【问题标题】:Django App Heroku Deployment: App not compatible with buildpackDjango App Heroku 部署:应用程序与 buildpack 不兼容
【发布时间】:2020-04-14 00:50:27
【问题描述】:

我从这里到任何地方都经历了很多可能的答案,看来问题仍然存在。

这是什么原因造成的,我该如何解决?

$ git push heroku master
Counting objects: 295, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (272/272), done.
Writing objects: 100% (295/295), 678.12 KiB | 8.07 MiB/s, done.
Total 295 (delta 114), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to mydjangoappblog.
remote:
To https://git.heroku.com/mydjangoappblog.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/mydjangoappblog.git'

我的Procfile

还有gunicorn:

【问题讨论】:

  • Please don't post screenshots of text。它们无法被搜索或复制,并且可用性差。相反,将代码作为文本直接粘贴到您的问题中。如果选择它并单击{} 按钮或Ctrl+K,代码块将缩进四个空格,这将导致它被呈现为代码。
  • 你的requirements.txt文件在你项目的根目录下吗?它是否已提交,您尝试推送的提交是否包含该文件?

标签: python django heroku procfile


【解决方案1】:

您的 Procfile 似乎无效

修改如下:

web: gunicorn django_project.wsgi

【讨论】:

  • 确实如此,但我认为这不会导致“应用程序与 buildpack 不兼容”消息。
猜你喜欢
  • 2018-07-07
  • 2021-11-12
  • 1970-01-01
  • 2021-12-24
  • 2018-02-16
  • 1970-01-01
  • 2020-10-03
  • 2018-01-22
相关资源
最近更新 更多