2716 Google Cloud Run 477f09c2

Google Cloud Run

tools-only Updated 7 repo stars

File contents

Google Cloud Run

Google Cloud Run

Dockerfile

FROM node:20-slim
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
CMD ["npm", "start"]

Deploy Script

#!/bin/bash
# deploy-cloud-run.sh

PROJECT_ID="${GOOGLE_CLOUD_PROJECT}"
SERVICE_NAME="vercel-service"
REGION="None"

# Build and push image
gcloud builds submit --tag gcr.io/$PROJECT_ID/$SERVICE_NAME

# Deploy to Cloud Run
gcloud run deploy $SERVICE_NAME \
  --image gcr.io/$PROJECT_ID/$SERVICE_NAME \
  --region $REGION \
  --platform managed \
  --allow-unauthenticated \
  --set-secrets=VERCEL_API_KEY=vercel-api-key:latest

tools-only/X-Skills/tree/main/development/devops/2716-google-cloud-run_477f09c2 commit 5caec26fcb

Frequently asked questions

npx skillmds@latest add tools-only/2716-google-cloud-run-477f09c2