目标
我是Heroku的新手,我正在尝试将一个非常简单的站点部署到Heroku中.
网站结构
如您所见,我不打算在此处部署复杂的Node.js或Laravel站点.
脚步
我当然登录到heroku
cd idesign4u/ git init heroku git:remote -a idesign4u git add . git commit -am "Project Initialization" heroku buildpacks:set heroku/PHP
我懂了
Buildpack set. Next release on idesign4u will use heroku/PHP. Run git push heroku master to create a new release using this buildpack.
我以为我已经准备好了.然后我跑了
git push heroku master
结果
我不断得到
Counting objects: 67,done. Delta compression using up to 4 threads. Compressing objects: 100% (64/64),done. Writing objects: 100% (67/67),60.75 MiB | 6.16 MiB/s,done. Total 67 (delta 2),reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/PHP.tgz remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure remote: remote: ! Push Failed remote: Verifying deploy... remote: remote: ! Push rejected to idesign4u. remote: To https://git.heroku.com/idesign4u.git ! [remote rejected] master -> master (pre-receive hook declined) error: Failed to push some refs to 'https://git.heroku.com/idesign4u.git'
Failed to detect set buildpack 07001
问题
我该如何绕过它?
我是否需要在Heroku网站上进行其他设置?
如何进行并进一步调试?
我现在正在接受任何建议.
任何提示/建议/帮助将非常感谢!
注意
我在这里发现了一些像这样的帖子:
Push rejected,failed to detect set buildpack heroku/php
我看了一下它,但这与我的情况不太相关.
您似乎正在尝试将静态网站部署到Heroku,但指定了期望的heroku / PHP builpack,以及……一个程序.
原文链接:https://www.f2er.com/php/133445.html两种可能的方法:
满足heroku / PHP webpack的requirements:
>有一些PHP代码.例如,带有重定向的index.PHP文件,如:
<?PHP header('Location:/index.html'); ?>
>有一个composer.json文件,它可以是:
{}
这是一个用于提供静态站点的自定义Webpack.完整指南可在here获得,但重点是:
heroku plugins:install heroku-cli-static heroku buildpacks:set https://github.com/hone/heroku-buildpack-static heroku static:init heroku static:deploy