서우 AgentOffice
← 라이브러리
development

GCP 클라우드 Run

원문: gcp-cloud-run

Specialized skill for building production-ready serverless applications on GCP. Covers Cloud Run services (containerized), Cloud Run Functions (event-driven), cold start optimization, and event-driven architecture with Pub/Sub.

무엇을 하나요

GCP Cloud Run Patterns Cloud Run Service Pattern Containerized web service on Cloud Run When to use : ['Web applications and APIs', 'Need any runtime or library', 'Complex services with multiple endpoints', 'Stateless containerized workloads'] dockerfile Dockerfile Multi stage build for smaller image FROM node:20 slim AS builder WORKDIR /app COPY package .json ./ RUN npm ci only=production FROM node:20 slim WORKDIR /app Copy only production dependencies COPY from=builder /app/node modules ./node modules COPY src ./src COPY package.json ./ Cloud Run uses PORT env variable ENV PORT=8080 EXPOSE 8080 Run as non root user USER node CMD ["node", "src/index.js"] javascript // src/index.js const exp

실행 시 본인 API 키(BYOK)로 동작하며, 모델 비용은 사용자 계정에서 직접 결제됩니다.