Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 831 Bytes

File metadata and controls

35 lines (23 loc) · 831 Bytes

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.

Run in Google Cloud

Build

docker build --tag pubsub-tutorial:java .

Run

PORT=8080 && docker run --rm -p 8080:${PORT} -e PORT=${PORT} pubsub-tutorial:java

Test

mvn clean verify

Deploy

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