July 22, 2025
Article
In this guide, you’ll learn how to take a Laravel app and deploy it to Google Cloud Run quickly using Docker and the gcloud
CLI. We cover containerizing your app, deploying it, setting environment variables, and optional steps like scheduling cron jobs and handling queues. If you want to skip the DevOps headache and get straight to scaling Laravel on GCP, this is the fastest way to start.
Intro:
Deploying Laravel to Google Cloud can feel overwhelming at first — Dockerfiles, environment variables, queue handling, and cron jobs can quickly turn into a full DevOps project. But it doesn’t have to be this hard. In this post, I’ll walk you through a quick way to get your Laravel app running on Google Cloud Run, using simple steps you can follow today.
🛠️ What You’ll Need
A Laravel project
A Google Cloud account
The
gcloud
CLI installedDocker installed locally
🚀 Step 1: Containerize Your Laravel App
You’ll need a Dockerfile
at the root of your project:
⚙️ Step 2: Deploy to Cloud Run
In your terminal:
Then:
🔐 Step 3: Configure Environment Variables
Use Google Secret Manager or pass vars in gcloud run deploy
using:
⏱️ Step 4: Schedule Cron Jobs (Optional)
Use Cloud Scheduler to call an authenticated route like:
Set up Laravel route to handle it.
📦 Bonus: Queue Workers with Pub/Sub
To support Laravel queues, configure Pub/Sub and a background worker service — or wait for LaraRun, which handles this automatically 😉
✅ Conclusion
Google Cloud Run is powerful, but a bit of a setup puzzle for Laravel devs. With tools like Docker, gcloud
, and a bit of tweaking, you can go serverless in under 10 minutes. Or, you can skip the hassle altogether and join the LaraRun waitlist — we’re building this experience for you.