Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

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