Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kevinjohn's avatar

Failed deployment of non laravel project

I'm using Forge to deploy a non-laravel site to my digital ocean server. I haven't updated the site in 4 months (it's a static one pager), but now when I push my changes to GitHub, the Forge deployment script fails and gives this error:

From github.com:kevinjohn/project
 * branch            master     -> FETCH_HEAD
   c02ef13..7d52b03  master     -> origin/master
Updating c02ef13..7d52b03
Fast-forward
 public/content/kevinjohn/style.css | 1 +
 1 file changed, 1 insertion(+)
/home/forge/.forge/provision-3384542.sh: line 5: --composer: command not found

I've checked that forge can SSH into the server still. Thoughts?

0 likes
8 replies
etkimbia's avatar

It looks like composer somehow isn't in your PATH any longer?

Are you using composer on this server/project?

If so, make sure your deploy script is pointing to the full path or reconfigure your PATH to include composer.

If not, then edit your deploy script and remove anything calling composer (I think by default it'll do composer install).

kevinjohn's avatar

There is no composer, and never was. It's literally a 2 file project (html and css).

The thing is, it's been like this for 6-9 months, with an update every so often (usually 3-4 weeks), but now with zero changes it doesn't work.

etkimbia's avatar

What does your deploy script look like in Forge?

kevinjohn's avatar
kevinjohn
OP
Best Answer
Level 1

Looks like after whatever move @TaylorOtwell has done to take Forge away from Linode, the deployment scripts have all be returned to standard. Mine was 2 lines long, and is now 5 lines long.

I've re-edited, and deployment worked.

P.S. Just checked, and 4 deployment scripts have all been reset. 99.% likely only to affect people not deploying a Laravel app.

edit: @etkimbia

cd /home/forge/beta.kevinjohngallagher.com
git pull origin master
composer install --no-interaction --no-dev --prefer-dist
php artisan migrate --force

when it should (and used to) look like:

cd /home/forge/beta.kevinjohngallagher.com
git pull origin master
etkimbia's avatar

Yes. Per my original comment: "If not, then edit your deploy script and remove anything calling composer (I think by default it'll do composer install)."

TaylorOtwell's avatar

Hm, I just checked on this in the Forge DB and I'm seeing custom deployment scripts carried over just fine. I checked several sites and their custom deploy commands were in place and the sites had not been updated since the migration. I'm not sure why yours seem to not have carried over.

Has anyone else seen this behavior?

Please or to participate in this conversation.