Unverified Commit b1b3b757 authored by Geshan Manandhar's avatar Geshan Manandhar Committed by GitHub

Add run on Google Cloud Run button to the docker example (#25824)



## Documentation / Examples

- [x] Make sure the linting passes


### Deployed with Cloud Run Button

<img width="1075" alt="Screen Shot 2021-06-06 at 10 22 51 pm" src="https://user-images.githubusercontent.com/170554/120924210-d7946780-c715-11eb-889e-79679f795c54.png">

### Next.js working on Google Cloud Run

<img width="982" alt="Screen Shot 2021-06-06 at 10 23 10 pm" src="https://user-images.githubusercontent.com/170554/120924229-e418c000-c715-11eb-9aca-569923f7306d.png">
parent e1502bc9
...@@ -32,3 +32,7 @@ yarn-error.log* ...@@ -32,3 +32,7 @@ yarn-error.log*
# vercel # vercel
.vercel .vercel
# lock files
yarn.lock
package-lock.json
...@@ -34,6 +34,10 @@ The `start` script in `package.json` has been modified to accept a `PORT` enviro ...@@ -34,6 +34,10 @@ The `start` script in `package.json` has been modified to accept a `PORT` enviro
- You will be prompted for [region](https://cloud.google.com/run/docs/quickstarts/build-and-deploy#follow-cloud-run): select the region of your choice, for example `us-central1`. - You will be prompted for [region](https://cloud.google.com/run/docs/quickstarts/build-and-deploy#follow-cloud-run): select the region of your choice, for example `us-central1`.
- You will be prompted to **allow unauthenticated invocations**: respond `y`. - You will be prompted to **allow unauthenticated invocations**: respond `y`.
Or click the button below, authorize the script, and select the project and region when prompted:
[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run/?git_repo=https://github.com/vercel/next.js.git&dir=examples/with-docker)
## Running Locally ## Running Locally
First, run the development server: First, run the development server:
......
{
"name": "nextjs",
"options": {
"allow-unauthenticated": true,
"memory": "256Mi",
"cpu": "1",
"port": 3000,
"http2": false
}
}
...@@ -11,7 +11,7 @@ export default function Home() { ...@@ -11,7 +11,7 @@ export default function Home() {
<main className={styles.main}> <main className={styles.main}>
<h1 className={styles.title}> <h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js!</a> Welcome to <a href="https://nextjs.org">Next.js</a> on Docker!
</h1> </h1>
<p className={styles.description}> <p className={styles.description}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment