cloud-run-basics
यह क्या करती है
यह स्किल Google Cloud Run के बारे में समझाती है और उसके इस्तेमाल में मार्गदर्शन देती है। यह एक ऐसा प्लेटफ़ॉर्म है जो बिना सर्वर सँभाले आपका कोड चलाता है। यह उन लोगों के लिए है जो Google Cloud पर ऐप या API बना या होस्ट कर रहे हैं।
कब इस्तेमाल करें
- ✓जब आप किसी वेब ऐप या API को Google Cloud Run पर ऑनलाइन करना चाहते हैं।
- ✓जब आपको कोई काम शेड्यूल पर या एक बार माँग पर चलाना है।
- ✓जब आपके पास कोई बैकग्राउंड वर्कर है जो queue से पढ़ता है और हमेशा चालू रहना चाहिए।
Skill का लिंक
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/cloud-run-basics/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी वेब ऐप को Google Cloud Run पर डिप्लॉय करने में मदद कीजिए, ताकि वह इंटरनेट पर लाइव हो जाए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह ज़रूरी Google Cloud सेवाएँ चालू करने, एक्सेस रोल सेट करने और तीन में से एक संसाधन बनाने के चरण बताती है: service, job या worker pool।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Cloud Run Basics
Cloud Run is a fully managed application platform for running your code, function, or container on top of Google's highly scalable infrastructure. It abstracts away infrastructure management, providing three primary resource types:
- Services: Responds to HTTP requests sent to a unique and stable endpoint, using stateless instances that autoscale based on a variety of key metrics, also responds to events and functions.
- Jobs: Executes parallelizable tasks that are executed manually, or on a schedule, and run to completion.
- Worker pools: Handles always-on background workloads such as pull-based workloads, for example, Kafka consumers, Pub/Sub pull queues, or RabbitMQ consumers.
Prerequisites
Enable the Cloud Run Admin API and Cloud Build APIs:
gcloud services enable run.googleapis.com cloudbuild.googleapis.com --quietIf you are under a domain restriction organization policy restricting unauthenticated invocations for your project, you will need to access your deployed service as described under Testing private services.
Required roles
You need the following roles to deploy your Cloud Run resource:
- Cloud Run Admin (
roles/run.admin) on the project - Cloud Run Source Developer (
roles/run.sourceDeveloper) on the project - Service Account User (
roles/iam.serviceAccountUser) on the service identity - Logs Viewer (
roles/logging.viewer) on the project
Cloud Build automatically uses the Compute Engine default service account as the default Cloud Build service account to build your source code and Cloud Run resource, unless you override this behavior.
For Cloud Build to build your sources, grant the Cloud Build service account the
Cloud Run Builder (roles/run.builder) role on your project:
gcloud projects add-iam-policy-binding PROJECT_ID \
--member=serviceAccount:SERVICE_ACCOUNT_EMAIL_ADDRESS \
--role=roles/run.builder \
--quiet
Replace PROJECT_ID with your Google Cloud project ID and
SERVICE_ACCOUNT_EMAIL_ADDRESS with the email address of the Cloud Build
service account.
Deploy a Cloud Run service
You can deploy your service to Cloud Run by using a container image or deploy directly from source code using a single Google Cloud CLI command.
CRITICAL RULE: Any deployed code MUST listen on 0.0.0.0 (not 127.0.0.1) and use the injected $PORT environment variable (defaults to 8080), or it will crash on boot.
Deploy a container image to Cloud Run
Cloud Run imports your container image during deployment. Cloud Run keeps this copy of the container image as long as it is used by a serving revision. Container images are not pulled from their container repository when a new Cloud Run instance is started.
Supported container images
You can directly use container images stored in the Artifact Registry, or Docker Hub. Google recommends the use of Artifact Registry since Docker Hub images are cached for up to one hour.
You can use container images from other public or private registries (like JFrog Artifactory, Nexus, or GitHub Container Registry), by setting up an Artifact Registry remote repository.
You should only consider Docker Hub for deploying popular container images such as Docker Official Images or Docker Sponsored OSS images. For higher availability, Google recommends deploying these Docker Hub images using an Artifact Registry remote repository.
To deploy a container image, run the following command:
gcloud run deploy SERVICE_NAME \
--image IMAGE_URL \
--region us-central1 \
--allow-unauthenticated \
--quiet
Replace the following:
- SERVICE_NAME: the name of the service you want to deploy to. Service names must be 49 characters or less and must be unique pe
अक्सर पूछे जाने वाले सवाल
service और job में क्या फ़र्क है?
service एक स्थिर पते पर वेब अनुरोधों का जवाब देती है। job एक काम तब तक चलाती है जब तक वह पूरा न हो, या तो माँग पर या शेड्यूल पर।
worker pool किस काम आता है?
यह हमेशा चलने वाले बैकग्राउंड काम के लिए है, जैसे queue से संदेश उठाने वाले कंज़्यूमर।
डिप्लॉय से पहले क्या चालू करना होगा?
आपके प्रोजेक्ट में Cloud Run Admin API और Cloud Build API चालू होने चाहिए।
जानकारी
लेखक का मूल विवरण
Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs), or handle always-on pull-based background processing (worker pools).
लोकप्रियता
- GitHub स्टार
- 33k
- रैंकिंग में स्थान
- #8738
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
owasp-security
33kआपके एजेंट को वेब ऐप, API, मोबाइल, कंटेनर और AI एजेंट्स के लिए OWASP सुरक्षा मार्गदर्शन सिखाती है, ताकि वह आम कमज़ोरियाँ पहचान सके और सुधार सुझा सके।
agent-management
33kआपके एजेंट को AI Maestro कमांड-लाइन से AI एजेंट बनाने, सूची देखने, hibernate और wake करने, नाम बदलने और हटाने देती है, हर एजेंट के जीवन-चक्र को संभालते हुए।
agent-messaging
33kAgent Messaging Protocol का उपयोग करके AI एजेंट्स के बीच हस्ताक्षरित संदेश भेजने, प्राप्त करने और उनका जवाब देने देती है, ज़्यादातर आपकी अपनी मशीन पर।
docs-search
33kआपके एजेंट को फ़ंक्शन सिग्नेचर, क्लास परिभाषा और कमेंट के लिए ऑटो-जनरेटेड कोड डॉक्यूमेंटेशन खोजने देती है, ताकि कोड बदलने से पहले वह असली API जाँच सके।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।