Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
gradle/wrapper
src
.factorypath
.gitignore Move app Apr 10, 2019
README.md Cleanup / Docker build improvements Apr 11, 2019
build.gradle Update Jib config Apr 11, 2019
gradle.properties
gradlew Move app Apr 10, 2019
gradlew.bat
micronaut-cli.yml Move app Apr 10, 2019
settings.gradle Move app Apr 10, 2019

README.md

Micronaut + Google Cloud Run

This example demonstrates Micronaut and Google Cloud Run.

Setup

The example uses Jib and Google Container Registry.

To get going you should have Google Cloud SDK installed and follow the Setup Instructions for Google Cloud Run.

You should then modify the googleProjectId reference in gradle.properties to your Google Project ID.

Deployment

To push the container to Container Registry run:

$ ./gradlew jib

Deployment is then as simple as running:

$ gcloud beta run deploy --image gcr.io/[PROJECT ID]/hello-world

Where [PROJECT ID] is replaced for your project ID. You should see output like the following:

Service name: (hello-world):  
Deploying container to Cloud Run service [hello-world] in project [PROJECT_ID] region [us-central1]

✓ Deploying... Done.                                                                                                                                                                                                            
  ✓ Creating Revision...                                                                                                                                                                                                        
  ✓ Routing traffic...                                                                                                                                                                                                          
Done.                                                                                                                                                                                                                           
Service [hello-world] revision [hello-world-00004] has been deployed and is serving traffic at https://hello-world-9487r97234-uc.a.run.app

The URL is the URL of your Cloud Run application.

You can’t perform that action at this time.