8000 python-docs-samples/run at main · matheusft/python-docs-samples · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"allShortcutsEnabled":false,"path":"run","repo":{"id":527069639,"defaultBranch":"main","name":"python-docs-samples","ownerLogin":"matheusft","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2022-08-21T00:25:20.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/2219910?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"main","listCacheKey":"v0:1661044074.180456","canEdit":false,"refType":"branch","currentOid":"d4d26d41a719d6bd6226e77db172501ec021e3db"},"tree":{"items":[{"name":"deployment-previews","path":"run/deployment-previews","contentType":"directory"},{"name":"django","path":"run/django","contentType":"directory"},{"name":"filesystem","path":"run/filesystem","contentType":"directory"},{"name":"hello-broken","path":"run/hello-broken","contentType":"directory"},{"name":"helloworld","path":"run/helloworld","contentType":"directory"},{"name":"idp-sql","path":"run/idp-sql","contentType":"directory"},{"name":"image-processing","path":"run/image-processing","contentType":"directory"},{"name":"jobs","path":"run/jobs","contentType":"directory"},{"name":"logging-manual","path":"run/logging-manual","contentType":"directory"},{"name":"markdown-preview","path":"run/markdown-preview","contentType":"directory"},{"name":"pubsub","path":"run/pubsub","contentType":"directory"},{"name":"service-auth","path":"run/service-auth","contentType":"directory"},{"name":"system-package","path":"run/system-package","contentType":"directory"},{"name":"README.md","path":"run/README.md","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGoogle Cloud Run Python Samples\u003c/h1\u003e\u003ca id=\"user-content-google-cloud-run-python-samples\" class=\"anchor\" aria-label=\"Permalink: Google Cloud Run Python Samples\" href=\"#google-cloud-run-python-samples\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples\u0026amp;page=editor\u0026amp;open_in_editor=blog/README.md\" rel=\"nofollow\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/cf29981159f3fb8f7d5c5ce0a4a4ab3d2a8e500b782d2016717c3e4aa6124bc5/687474703a2f2f677374617469632e636f6d2f636c6f75647373682f696d616765732f6f70656e2d62746e2e706e67\" alt=\"Open in Cloud Shell\" data-canonical-src=\"http://gstatic.com/cloudssh/images/open-btn.png\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis directory contains samples for \u003ca href=\"https://cloud.run\" rel=\"nofollow\"\u003eGoogle Cloud Run\u003c/a\u003e. \u003ca href=\"https://cloud.google.com/run/docs/\" rel=\"nofollow\"\u003eCloud Run\u003c/a\u003e runs stateless \u003ca href=\"https://cloud.google.com/containers/\" rel=\"nofollow\"\u003econtainers\u003c/a\u003e on a fully managed environment or in your own GKE cluster.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSamples\u003c/h2\u003e\u003ca id=\"user-content-samples\" class=\"anchor\" aria-label=\"Permalink: Samples\" href=\"#samples\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eSample\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eDeploy\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"/matheusft/python-docs-samples/blob/main/run/helloworld\"\u003eHello World\u003c/a\u003e ➥\u003c/td\u003e\n\u003ctd\u003eQuickstart\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://deploy.cloud.run/?git_repo=https://github.com/knative/docs\u0026amp;dir=docs/serving/samples/hello-world/helloworld-python\" rel=\"nofollow\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/7cb664cef0ae8420268518e77b1e908f877bdff78becee0e0b5c1e71fced0f49/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f636c6f756472756e2f627574746f6e2e737667\" alt=\"Run on Google Cloud\" height=\"30\" data-canonical-src=\"https://storage.googleapis.com/cloudrun/button.svg\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"/matheusft/python-docs-samples/blob/main/run/pubsub\"\u003eCloud Pub/Sub\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eHandling Pub/Sub push messages\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://deploy.cloud.run/?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples\u0026amp;dir=run/pubsub\" rel=\"nofollow\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/7cb664cef0ae8420268518e77b1e908f877bdff78becee0e0b5c1e71fced0f49/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f636c6f756472756e2f627574746f6e2e737667\" alt=\"Run on Google Cloud\" height=\"30\" data-canonical-src=\"https://storage.googleapis.com/cloudrun/button.svg\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"/matheusft/python-docs-samples/blob/main/cloud-sql/mysql/sqlalchemy\"\u003eCloud SQL (MySQL)\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eUse MySQL with Cloud Run\u003c/td\u003e\n\u003ctd\u003e-\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"/matheusft/python-docs-samples/blob/main/cloud-sql/postgres/sqlalchemy\"\u003eCloud SQL (Postgres)\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eUse Postgres with Cloud Run\u003c/td\u003e\n\u003ctd\u003e-\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"/matheusft/python-docs-samples/blob/main/run/django\"\u003eDjango\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eDeploy Django on Cloud Run\u003c/td\u003e\n\u003ctd\u003e-\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"/matheusft/python-docs-samples/blob/main/run/idp-sql\"\u003eIdentity Platform\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eAuthenticate users and connect to a Cloud SQL postgreSQL databases\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://deploy.cloud.run/?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples\u0026amp;dir=run/idp-sql\" rel=\"nofollow\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/7cb664cef0ae8420268518e77b1e908f877bdff78becee0e0b5c1e71fced0f49/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f636c6f756472756e2f627574746f6e2e737667\" alt=\"Run on Google Cloud\" height=\"30\" data-canonical-src=\"https://storage.googleapis.com/cloudrun/button.svg\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cp dir=\"auto\"\u003eFor more Cloud Run samples beyond Python, see the main list in the \u003ca href=\"https://github.com/GoogleCloudPlatform/cloud-run-samples\"\u003eCloud Run Samples repository\u003c/a\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSetup\u003c/h2\u003e\u003ca id=\"user-content-setup\" class=\"anchor\" aria-label=\"Permalink: Setup\" href=\"#setup\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://cloud.google.com/run/docs/setup\" rel=\"nofollow\"\u003eSet up for Cloud Run development\u003c/a\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eClone this repository:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003egit clone https://github.com/GoogleCloudPlatform/python-docs-samples.git\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eNote: Some samples in the list above are hosted in other repositories. They are noted with the symbol \"➥\".\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eHow to run a sample locally\u003c/h2\u003e\u003ca id=\"user-content-how-to-run-a-sample-locally\" class=\"anchor\" aria-label=\"Permalink: How to run a sample locally\" href=\"#how-to-run-a-sample-locally\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://docs.docker.com/install/\" rel=\"nofollow\"\u003eInstall docker locally\u003c/a\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://cloud.google.com/run/docs/building/containers#building_locally_and_pushing_using_docker\" rel=\"nofollow\"\u003eBuild the sample container\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"export SAMPLE=\u0026lt;SAMPLE_NAME\u0026gt;\ncd $SAMPLE\ndocker build --tag $SAMPLE .\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003eexport SAMPLE=\u0026lt;SAMPLE_NAME\u0026gt;\ncd $SAMPLE\ndocker build --tag $SAMPLE .\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://cloud.google.com/run/docs/testing/local\" rel=\"nofollow\"\u003eRun containers locally\u003c/a\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eWith the built container:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"PORT=8080 \u0026amp;\u0026amp; docker run --rm -p 8080:${PORT} -e PORT=${PORT} $SAMPLE\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ePORT=8080 \u0026amp;\u0026amp; docker run --rm -p 8080:${PORT} -e PORT=${PORT} $SAMPLE\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eOverriding the built container with local code:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"PORT=8080 \u0026amp;\u0026amp; docker run --rm \\\n -p 8080:${PORT} -e PORT=${PORT} \\\n -v $PWD:/app $SAMPLE\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ePORT=8080 \u0026amp;\u0026amp; docker run --rm \\\n -p 8080:${PORT} -e PORT=${PORT} \\\n -v $PWD:/app $SAMPLE\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eInjecting your service account key for access to GCP services:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"# Set the name of the service account key within the container\nexport SA_KEY_NAME=my-key-name-123\n\nPORT=8080 \u0026amp;\u0026amp; docker run --rm \\\n -p 8080:${PORT} \\\n -e PORT=${PORT} \\\n -e GOOGLE_APPLICATION_CREDENTIALS=/tmp/keys/${SA_KEY_NAME}.json \\\n -v $GOOGLE_APPLICATION_CREDENTIALS:/tmp/keys/${SA_KEY_NAME}.json:ro \\\n -v $PWD:/app $SAMPLE\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e# Set the name of the service account key within the container\nexport SA_KEY_NAME=my-key-name-123\n\nPORT=8080 \u0026amp;\u0026amp; docker run --rm \\\n -p 8080:${PORT} \\\n -e PORT=${PORT} \\\n -e GOOGLE_APPLICATION_CREDENTIALS=/tmp/keys/${SA_KEY_NAME}.json \\\n -v $GOOGLE_APPLICATION_CREDENTIALS:/tmp/keys/${SA_KEY_NAME}.json:ro \\\n -v $PWD:/app $SAMPLE\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eUse the --volume (-v) flag to inject the credential file into the container\n(assumes you have already set your \u003ccode\u003eGOOGLE_APPLICATION_CREDENTIALS\u003c/code\u003e\nenvironment variable on your machine)\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eUse the --environment (-e) flag to set the \u003ccode\u003eGOOGLE_APPLICATION_CREDENTIALS\u003c/code\u003e\nvariable inside the container\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp dir=\"auto\"\u003eLearn more about \u003ca href=\"https://cloud.google.com/run/docs/testing/local#running_locally_using_docker_with_access_to_services\" rel=\"nofollow\"\u003etesting your container image locally.\u003c/a\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eDeploying\u003c/h2\u003e\u003ca id=\"user-content-deploying\" class=\"anchor\" aria-label=\"Permalink: Deploying\" href=\"#deploying\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003eSet an environment variable with your GCP Project ID\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"export GOOGLE_CLOUD_PROJECT=\u0026lt;PROJECT_ID\u0026gt;\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003eexport GOOGLE_CLOUD_PROJECT=\u0026lt;PROJECT_ID\u0026gt;\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003eSubmit a build using Google Cloud Build\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"gcloud builds submit --tag gcr.io/${GOOGLE_CLOUD_PROJECT}/${SAMPLE}\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003egcloud builds submit --tag gcr.io/${GOOGLE_CLOUD_PROJECT}/${SAMPLE}\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003eDeploy to Cloud Run\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"gcloud run deploy $SAMPLE --image gcr.io/${GOOGLE_CLOUD_PROJECT}/${SAMPLE}\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003egcloud run deploy $SAMPLE --image gcr.io/${GOOGLE_CLOUD_PROJECT}/${SAMPLE}\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSee \u003ca href=\"https://cloud.google.com/run/docs/building/containers\" rel=\"nofollow\"\u003eBuilding containers\u003c/a\u003e and \u003ca href=\"https://cloud.google.com/run/docs/deploying\" rel=\"nofollow\"\u003eDeploying container images\u003c/a\u003e\nfor more information.\u003c/p\u003e\n\u003c/article\u003e","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Google Cloud Run Python Samples","anchor":"google-cloud-run-python-samples","htmlText":"Google Cloud Run Python Samples"},{"level":2,"text":"Samples","anchor":"samples","htmlText":"Samples"},{"level":2,"text":"Setup","anchor":"setup","htmlText":"Setup"},{"level":2,"text":"How to run a sample locally","anchor":"how-to-run-a-sample-locally","htmlText":"How to run a sample locally"},{"level":2,"text":"Deploying","anchor":"deploying","htmlText":"Deploying"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fmatheusft%2Fpython-docs-samples%2Ftree%2Fmain%2Frun"}},"totalCount":14,"showBranchInfobar":true},"fileTree":{"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":".kokoro","path":".kokoro","contentType":"directory"},{"name":"appengine","path":"appengine","contentType":"directory"},{"name":"asset","path":"asset","contentType":"directory"},{"name":"auth","path":"auth","contentType":"directory"},{"name":"automl","path":"automl","contentType":"directory"},{"name":"bigquery","path":"bigquery","contentType":"directory"},{"name":"bigquery_storage","path":"bigquery_storage","contentType":"directory"},{"name":"billing","path":"billing","contentType":"directory"},{"name":"blog","path":"blog","contentType":"directory"},{"name":"cdn","path":"cdn","contentType":"directory"},{"name":"cloud-sql","path":"cloud-sql","contentType":"directory"},{"name":"codelabs","path":"codelabs","contentType":"directory"},{"name":"composer","path":"composer","contentType":"directory"},{"name":"compute","path":"compute","contentType":"directory"},{"name":"container_registry","path":"container_registry","contentType":"directory"},{"name":"data-science-onramp","path":"data-science-onramp","contentType":"directory"},{"name":"datacatalog","path":"datacatalog","contentType":"directory"},{"name":"dataflow","path":"dataflow","contentType":"directory"},{"name":"datalabeling","path":"datalabeling","contentType":"directory"},{"name":"dataproc","path":"dataproc","contentType":"directory"},{"name":"datastore","path":"datastore","contentType":"directory"},{"name":"dialogflow","path":"dialogflow","contentType":"directory"},{"name":"dlp","path":"dlp","contentType":"directory"},{"name":"dns","path":"dns","contentType":"directory"},{"name":"document","path":"document","contentType":"directory"},{"name":"endpoints","path":"endpoints","contentType":"directory"},{"name":"error_reporting","path":"error_reporting","contentType":"directory"},{"name":"eventarc","path":"eventarc","contentType":"directory"},{"name":"firestore","path":"firestore","contentType":"directory"},{"name":"functions","path":"functions","contentType":"directory"},{"name":"healthcare","path":"healthcare","contentType":"directory"},{"name":"iam","path":"iam","contentType":"directory"},{"name":"iap","path":"iap","contentType":"directory"},{"name":"iot","path":"iot","contentType":"directory"},{"name":"jobs","path":"jobs","contentType":"directory"},{"name":"kms","path":"kms","contentType":"directory"},{"name":"kubernetes_engine","path":"kubernetes_engine","contentType":"directory"},{"name":"language","path":"language","contentType":"directory"},{"name":"logging","path":"logging","contentType":"directory"},{"name":"media-translation","path":"media-translation","contentType":"directory"},{"name":"media","path":"media","contentType":"directory"},{"name":"media_cdn","path":"media_cdn","contentType":"directory"},{"name":"memorystore","path":"memorystore","contentType":"directory"},{"name":"ml_engine","path":"ml_engine","contentType":"directory"},{"name":"monitoring","path":"monitoring","contentType":"directory"},{"name":"notebooks","path":"notebooks","contentType":"directory"},{"name":"opencensus","path":"opencensus","contentType":"directory"},{"name":"people-and-planet-ai","path":"people-and-planet-ai","contentType":"directory"},{"name":"profiler","path":"profiler","contentType":"directory"},{"name":"pubsub","path":"pubsub","contentType":"directory"},{"name":"pubsublite","path":"pubsublite","contentType":"directory"},{"name":"run","path":"run","contentType":"directory"},{"name":"scheduler","path":"scheduler","contentType":"directory"},{"name":"scripts","path":"scripts","contentType":"directory"},{"name":"secretmanager","path":"secretmanager","contentType":"directory"},{"name":"servicedirectory","path":"servicedirectory","contentType":"directory"},{"name":"spanner","path":"spanner","contentType":"directory"},{"name":"speech","path":"speech","contentType":"directory"},{"name":"storage","path":"storage","contentType":"directory"},{"name":"storagetransfer","path":"storagetransfer","contentType":"directory"},{"name":"tables","path":"tables","contentType":"directory"},{"name":"tasks","path":"tasks","contentType":"directory"},{"name":"testing","path":"testing","contentType":"directory"},{"name":"texttospeech","path":"texttospeech","contentType":"directory"},{"name":"trace","path":"trace","contentType":"directory"},{"name":"translate","path":"translate","contentType":"directory"},{"name":"video","path":"video","contentType":"directory"},{"name":"vision","path":"vision","contentType":"directory"},{"name":"workflows","path":"workflows","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".trampolinerc","path":".trampolinerc","contentType":"file"},{"name":".trampolinerc_tmpl","path":".trampolinerc_tmpl","contentType":"file"},{"name":"AUTHORING_GUIDE.md","path":"AUTHORING_GUIDE.md","contentType":"file"},{"name":"CODE_OF_CONDUCT.md","path":"CODE_OF_CONDUCT.md","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"MAC_SETUP.md","path":"MAC_SETUP.md","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"SECURITY.md","path":"SECURITY.md","contentType":"file"},{"name":"favicon.ico","path":"favicon.ico","contentType":"file"},{"name":"noxfile-template.py","path":"noxfile-template.py","contentType":"file"},{"name":"noxfile_config.py","path":"noxfile_config.py","contentType":"file"},{"name":"pytest.ini","path":"pytest.ini","contentType":"file"},{"name":"renovate.json","path":"renovate.json","contentType":"file"}],"totalCount":85}},"fileTreeProcessingTime":8.172149,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/matheusft/python-docs-samples/branches":{"post":"NCXpbsv8QT8-OgbAhDRCL6liZ6JDdhzi2NQWz4GTyo1jv3CG-b0DZ-uswbPlYQhQOonqPQRPI4O-VIipmmeXnw"},"/matheusft/python-docs-samples/branches/fetch_and_merge/main":{"post":"rQ21lYHrY9QKhXN9inFeo7msFoM5RHJEO4XxzzOMdceXxhgKIkhSeJO5BynIF16wxNNnPDzYbMHn0wmA9JGBVw"},"/matheusft/python-docs-samples/branches/fetch_and_merge/main?discard_changes=true":{"post":"Ow8KzCEu_3ONDDwqZf9TXXjIEODL8H_EbPlAbemU5sYBxKdTgo3O3xQwSH4nmVNOBbdhX85sYUGwr7giLokSVg"}}},"title":"python-docs-samples/run at main · matheusft/python-docs-samples","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-7d7eb7c71814.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1ae9fa256942.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true,"github_models_repo_integration":false}}}
0