Deploy Next.js to Cloud Run

With a Dockerfile and a cloudbuild.yaml

thoughtstile

--

Step 1: Setup

npx create-next-app client &&
curl https://gist.githubusercontent.com/thoughtstile/ac82beb65d55898c44719e3b1af960fe/raw/2a2223f5f923141c04e53ac47876a81ba6e7f9fe/Dockerfile -o ./client/Dockerfile &&
curl https://gist.githubusercontent.com/thoughtstile/ab9cc994bc1b278625a1539aa184fb6e/raw/ae40a85a6d6916c4c5c40e38f8eed8de73835e16/cloudbuild.yaml -o ./cloudbuild.yaml

NOTE: The default directory for this guide will be at ./client.

--

--