Laravel 11: error during updating composer package

This is a Laravel sail app. I am trying to fly launch and durng the defaul installation, I get the following errors -


Default Laravel Dockerfile :point_down:

Output of sail php --init :point_down:

Any idea how what do I do?

Hi,

I haven’t used Sail with Fly so I’m not sure what would need adapting. It looks like an issue with PHP extensions it needs/expects not being present … although that final image suggests they are there. Strange.

Unless you specifically need to use Sail … would it be worth using Fly’s built-in support for Laravel? They have a custom-made Dockerfile. These are the docs Laravel on Fly.io · Fly Docs (although they are a bit out of date).

You should just be able to run fly launch and it will spot Laravel, install the various files and deploy, all in one go. Despite what those docs say you no longer need to say “No” and run fly deploy afterwards (that was to let you stage a secret, but that is now done for you).

1 Like

Hey Greg,
Thank you for dropping by. It is solved now. There were issues with extensions as it showed. I am relatively new with docker and did not understand how sail was working.
Installed the extensions one by one just to see the incremental improvement. Works now.

App is launched, there are still errors but getting myself unstuck from them. A lotta folks talk about fly.io for Laravel now. How I discovered fly.io. It would be great if they include some guide or some information on how to deploy Laravel sail app. Sail is GOAT for development stage, extremely annoying for production for newbies.

Thank you so much for replying.

1 Like

Hey,

No problem. I tend to think of Sail being used for local development. I assume Fly would prefer to support their own approach to doing it since they don’t actually use Docker behind the scenes.

I assume you are aware of this but if you are manually installing PHP extensions on the machine (with SSH), those changes could be lost. It’s safer to add all instructions to the Dockerfile. That way a future build/deploy will run them too :slight_smile:

1 Like

Strange, I just installed the extensions locally and been unsticking myself from random other errors. went through several fly launch and fly deployment. Did not run into any issues. Do you still think I should add those extensions to the Dockerfile?

Personally I would. That Dockerfile says how to make a new image.

I don’t know how the deploy command works internally but normally what would happen is a deploy triggers a new build. That build follows the instructions in the Dockerfile. So any changes you have made manually (outside of that) would not be known, and so not applied. Perhaps your deploy did not trigger a new build, or perhaps they persisted regardless :thinking:. Not sure.

1 Like

Hey Greg,

All good now. Just needed to install a bunch of extensions specified in the error. Thaks a lot man. You are always there fortunately!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.