TypeScriptComing SoonMIT

Next.js Cloud Run Starter

Production-ready Next.js 16 + Docker + Cloud Run template

A batteries-included starter template for deploying Next.js 16 applications to Google Cloud Run with Docker multi-stage builds and GitHub Actions CI/CD.

Next.jsDockerCloud RunGitHub ActionsTailwindCI/CD

🚧 Coming Soon

This project is in planning. Star the GitHub org to get notified when it launches.

What's Included

Next.js 16 with App Router and TurbopackTailwindCSS 3 with typography pluginDocker multi-stage build (deps → builder → runner)GitHub Actions CI/CD with Workload Identity FederationCloud Run deployment to asia-south1Security headers (CSP, X-Frame-Options, HSTS)TypeScript 5 strict modeESLint 9 configuration

Quick Start

Clone the repository, install dependencies, and run the development server.

# Clone
git clone https://github.com/svbtechlabs/nextjs-cloudrun-starter
cd nextjs-cloudrun-starter

# Install
npm install

# Develop
npm run dev

Deploy to Cloud Run

Set the three required GitHub Actions secrets and push to main — the pipeline handles the rest.

# Required GitHub Secrets
GCP_PROJECT_ID           = your-gcp-project
GCP_WORKLOAD_IDENTITY_PROVIDER = projects/.../providers/github
GCP_SERVICE_ACCOUNT      = deploy-sa@your-project.iam.gserviceaccount.com

# Push to deploy
git push origin main

Docker Build

The Dockerfile uses a 3-stage build to keep the final image minimal. The runner stage runs as a non-root user for security.

# Build locally
docker build -t svbtechlabs-app .

# Run locally
docker run -p 3000:3000 svbtechlabs-app

Next.js Cloud Run Starter

Have a Contribution?

Issues, PRs, and feature ideas are always welcome.