Could not detect buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/php.tgz

goal

I am very new to Heroku and I am trying to deploy a very simple site to Heroku.

Site structure

enter image description here

As you can see, I'm not trying to deploy a complex Node.js or Laravel Site here.


Actions

Of course, I enter the hero, then

cd idesign4u/ git init heroku git:remote -a idesign4u git add . git commit -am "Project Initialization" heroku buildpacks:set heroku/php 

I got it

 Buildpack set. Next release on idesign4u will use heroku/php. Run git push heroku master to create a new release using this buildpack. 

I thought everything was set up. Then i ran

 git push heroku master 

Result

I kept getting

 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' 

Could not find set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/php.tgz


Questions

How do I get around this?

Are there any other settings I need to make on the Heroku website?

How would I do this and debug it further?


I open any offers at this moment.

Any tips / suggestions / help on this would be greatly appreciated!


Note

I found here a SO post like this:

Click rejected, could not detect set buildpack heroku / php

I looked at him, but in my case this is not very important.

+5
source share
2 answers

It sounds like you're trying to deploy a static website to Heroku, but specifying builpack heroku/php , which expects, well ... a PHP application.

Two possible ways to do this:

Check out the requirements of the heroku/php web package :

  • You have some PHP code. For example, an index.php file with redirection, for example:

    <?php header( 'Location: /index.html' ) ; ?>

  • Have a composer.json file, which can only be:

    {}

Use heroku-buildpack-static :

This is a custom web service package for serving static sites. A complete guide is available here , but the main points are:

 heroku plugins:install heroku-cli-static heroku buildpacks:set https://github.com/hone/heroku-buildpack-static heroku static:init heroku static:deploy 
+11
source

If you want to use some PHP in the future ...

  • Change the index.html file to index.php
  • Commit your changes to the wizard.
  • git push heroku master
0
source

Source: https://habr.com/ru/post/1263791/


All Articles