cloud-run-basics
하는 일
이 스킬은 서버를 직접 관리하지 않고 코드를 실행하는 플랫폼인 Google Cloud Run의 사용법을 설명하고 안내합니다. Google Cloud에서 앱을 만들거나 호스팅하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓웹 앱이나 API를 Google Cloud Run에 올리고 싶을 때.
- ✓작업을 일정에 따라 실행하거나 한 번 요청해서 실행해야 할 때.
- ✓큐에서 읽어 오며 항상 실행되어야 하는 백그라운드 워커가 있는 경우.
스킬 링크
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/cloud-run-basics/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 웹 앱을 Google Cloud Run에 배포해서 인터넷에서 볼 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 필요한 Google Cloud 서비스를 활성화하고 접근 역할을 설정하는 단계를 안내한 뒤, 서비스, 작업, 워커 풀 중 하나의 리소스 유형을 만들도록 돕습니다.
기술 내용 (원본 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
자주 묻는 질문
서비스와 작업의 차이는 무엇인가요?
서비스는 고정 주소에서 웹 요청에 응답하고, 작업은 완료될 때까지 실행되며 요청하거나 일정에 따라 실행됩니다.
워커 풀은 무엇에 쓰나요?
메시지를 가져오는 큐 소비자처럼 항상 실행되는 백그라운드 작업용입니다.
배포 전에 활성화해야 할 것이 있나요?
네. 프로젝트에서 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
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
owasp-security
33k웹 앱, API, 모바일, 컨테이너, AI 에이전트를 위한 OWASP 보안 지침을 따르도록 해서, 흔한 약점을 찾고 수정안을 제안하게 합니다.
agent-management
33k에이전트가 AI Maestro 명령줄을 사용해 AI 에이전트를 만들고, 나열하고, 일시 정지하고, 깨우고, 이름을 바꾸고, 삭제하도록 돕습니다.
agent-messaging
33k에이전트가 Agent Messaging Protocol로 AI 에이전트 사이에 서명된 메시지를 보내고, 받고, 답하도록 돕습니다. 대부분 내 컴퓨터에서 작동합니다.
docs-search
33k에이전트가 자동 생성된 코드 문서에서 함수 시그니처, 클래스 정의, 주석을 검색하도록 해서, 코드를 바꾸기 전에 실제 API를 확인하게 합니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.