Getting going with Heroku and PHP (part 3)

In Getting going with Heroku and PHP (part 1) and part 2 I detailed how I made Heroku happy to build and deploy my website, but was now getting Server 5o3 errors when trying to view it in the browser.  Not a good place to be!

I then (slowly, too slowly) figured out it was because of the “web/” on the end of the command in my Procfile.  This was telling Heroku to look for my project in the “web/” folder.  This was slightly annoying, as it means that I didn’t need to learn about “git subtree”, I could have just pushed my whole project and pointed the Procfile at “build/”.

To test this theory, I updated my Procfile to read…

web: vendor/bin/heroku-php-apache2 build/

I then went to Heroku and did a manual deploy from my “master” branch.

Still no joy…

Oh yes, it would help if I pushed my local commit to the Github repo!

And success!  Having pushed my change and done another manual deploy, my app had now appeared.

This is excellent, I can now set my automatic deploys in Heroku to go from my “master” branch and modify my push alias (“p” – see my git aliases) to not do the deploy separately with “git subtree”.

I love streamlining a process like this, and so far, I’m loving Heroku.