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

kristof's avatar

Web App Docker Best Practices

Hi, I'm starting a new project and would love to be able to deploy my application to a service like Cloud Run or any other container as a service provider. It makes things cheaper and are highly scalable. I'm avoiding vapor since I would rather use Terraform to deploy and manage my infra.

I've struggled to find best practices on how to containerize a laravel app to be production ready. What is the best approach to doing this? I use sail for development but it doesn't offer any recommendations for deployments other than using vapor. Is the vapor base image a good option?

0 likes
4 replies
kristof's avatar

Thanks Tray2. I've already watched that series. I was hoping there might be a way to deploy without the need to for docker-compose and nginx. Services like the Cloud Run only take single containers images . Do you have any recommendation on creating a single container for running laravel web app?

kristof's avatar

@Tray2 ok thanks for confirming. I've tried creating single containers that run the app but none seem to be "clean" solutions. I saw that vapor uses docker with Lambda so I figured there is some support for single container apps. I'll continue experimenting.

Thanks again for your help.

Please or to participate in this conversation.