Report this

What is the reason for this report?

Help, deploy error finding executable heroku-php-nginx

Posted on June 14, 2022

I am trying to create a new app using the App Platform which is the built and deployed the same as an existing app in our account, created by a legacy developer.

It is a PHP app, built from a Docker image. On deploy I am getting an error from the Run Command as follows:

starting container: starting non-root container [heroku-php-nginx -C server/digitalocean/nginx_app.conf public/]: error finding executable "heroku-php-nginx" in PATH [/opt/bitnami/php/bin /opt/bitnami/php/sbin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin]: no such file or directory

My understanding is the Heroku buildpacks are included in the app creation, but perhaps that is not the case if building from a Dockerfile?

However, there is no indication of any Heroku build PHP/Nginx reference in the existing Dockerfile, and the above is the Run command from the legacy app.

So I am a bit stumped here as to what to do. Should the buildpacks be added to Docker since I am going that route to build the app? If so some guidance would be much appreciated.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

In theory, if you are deploying using a Dockerfile, the Cloud Native Buildpacks would not be used at all. However, if you don’t provide a dockerfile_path the build system will attempt to use Cloud Native Buildpacks to build your application.

As you already have a Dockerfile, you can follow the steps here on how to use it with the App Platform:

https://docs.digitalocean.com/products/app-platform/languages-frameworks/docker/

In case that you want to give the Cloud Native build packs a try, then you are most likely seeing the issue as the heroku-php-nginx command is defined in your compsoer.json file. If this is the case, I could suggest following the steps here for more information on how to setup your PHP apps:

https://docs.digitalocean.com/products/app-platform/languages-frameworks/php/

Let me know how it goes!

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.