java-docs-samples/appengine-java11/cloudrun-pubsub at master · YaliZ/java-docs-samples · GitHub
Skip to content

Latest commit

 

History

History
 
 

Folders and files

README.md

Cloud Run Pub/Sub Tutorial Sample

This sample shows how to create a service that processes Pub/Sub messages.

Use it with the Cloud Pub/Sub with Cloud Run tutorial.

Build

docker build --tag pubsub-tutorial:java .

Run

docker run --rm -p 9090:8080 pubsub-tutorial:java

Test

mvn clean verify

Deploy

gcloud builds submit --tag gcr.io/${GOOGLE_CLOUD_PROJECT}/pubsub-tutorial
gcloud alpha run deploy pubsub-tutorial --image gcr.io/${GOOGLE_CLOUD_PROJECT}/pubsub-tutorial