9.3 Google Cloud Run
To deploy to Google Cloud Run we recommend using JIB to containerize your application.
Using the CLI Creating an application with JIB:
Or with Micronaut Launch
|
With JIB setup to deploy your application to Google Container Registry, run:
$ ./gradlew jib
You are now ready to deploy your application:
$ gcloud run deploy --image gcr.io/[PROJECT ID]/example --platform=managed --allow-unauthenticated
Where [PROJECT ID]
is your project ID. You will be asked to specify a region and will see output like the following:
Service name: (example):
Deploying container to Cloud Run service [example] in project [PROJECT_ID] region [us-central1]
✓ Deploying... Done.
✓ Creating Revision...
✓ Routing traffic...
✓ Setting IAM Policy...
Done.
Service [example] revision [example-00004] has been deployed and is serving 100 percent of traffic at https://example-9487r97234-uc.a.run.app
The URL is the URL of your Cloud Run application.