Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 984 Bytes

File metadata and controls

37 lines (24 loc) · 984 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:python .

Run Locally

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

Test

pytest

Note: you may need to install pytest using pip install pytest.

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