examples: add allow-unauthenticated option to cloud run deploy (#58792)

Co-authored-by: Lee Robinson <me@leerob.io>
This commit is contained in:
Luke Schlangen 2024-01-06 11:08:27 -06:00 committed by GitHub
parent 781fa7745d
commit 0ea127c642
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,11 +42,10 @@ This will build the project as a standalone app inside the Docker image.
1. Run `gcloud auth login` to log in to your account.
1. [Create a new project](https://cloud.google.com/run/docs/quickstarts/build-and-deploy) in Google Cloud Run (e.g. `nextjs-docker`). Ensure billing is turned on.
1. Build your container image using Cloud Build: `gcloud builds submit --tag gcr.io/PROJECT-ID/helloworld --project PROJECT-ID`. This will also enable Cloud Build for your project.
1. Deploy to Cloud Run: `gcloud run deploy --image gcr.io/PROJECT-ID/helloworld --project PROJECT-ID --platform managed`. Choose a region of your choice.
1. Deploy to Cloud Run: `gcloud run deploy --image gcr.io/PROJECT-ID/helloworld --project PROJECT-ID --platform managed --allow-unauthenticated`. Choose a region of your choice.
- You will be prompted for the service name: press Enter to accept the default name, `helloworld`.
- 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`.
## Running Locally