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.
Click below to sign up and get $200 of credit to try our products over 60 days!
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_paththe 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:
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-nginxcommand is defined in your
compsoer.jsonfile. If this is the case, I could suggest following the steps here for more information on how to setup your PHP apps:
Let me know how it goes!