Skip to content

taeold/nextjs-on-gcp

Repository files navigation

Next.js on Google Cloud Platform

This is a demo Next.js project powered by GCP's serverless infrastructure.

Visit the live demo site to see it in action.

Service Infrastructure

Dynamic content is generated by server running on Cloud Run, a fully managed compute platform that automatically scales stateless containers.

Static assets are served by Firebase Hosting, a fast and secure way to host static content globally. Firebase Hosting also simplifies the process of connecting a custom domain for applications running on Cloud Run.

Next.js cache handler is implemented with Firebase Realtime Database, persisting cached pages and data to reduce server workloads by fulfilling requests from cached content when possible.

Deploying on your own project

Use the setup.sh to provision your GCP project:

./scripts/setup.sh -p my-project -r us-central1

Then, build and deploy the application on Cloud Build. Use the deploy.sh to quickly get started:

./scripts/deploy.sh -p my-project -r us-central1

About

Demo app for deploying Next.js app on GCP

Resources

Stars

Watchers

Forks