Error when deploying laravel app on DigitalOcean App Platform

467 views Asked by At

I have an app that has been deployed on DigitalOcean App Platform. Ever since making the latest changes I keep getting the error

bash: line 1: heroku-php-apache2: command not found

Build phase runs to completion and then the deploy fails. I'm lost. Any help is appreciated. Thank you.

I have tried updating node and npm. Deleting package-lock.json and node_modules and running npm install. Tried changing Procfile.

2

There are 2 answers

0
Pine Valley On

I ended up figuring this out. While watching my build logs, I noticed that PHP was never being installed. It seemed to be that App Platform was not detecting composer.json and it was building it as a Node app and every rebuild was built from the build cache and kept building it the same way. I messed with the App Spec and added the feature to use Ubuntu 18 instead of 22.04 which forced it to build differently and it added PHP. After the rebuild, I removed the Ubuntu 18 feature in the App Spec and built it again with PHP buildpack present. Hope this helps someone.

0
Nenad On

In you App spec add the following:

features:
- buildpack-stack=ubuntu-18