# Cloud Build configuration for GCP Cloud Run deployment
steps:
# Build the container image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/playwright-mcp-http-server:$SHORT_SHA', '-t', 'gcr.io/$PROJECT_ID/playwright-mcp-http-server:latest', '.']
# Push the container image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/playwright-mcp-http-server:$SHORT_SHA']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/playwright-mcp-http-server:latest']
# Deploy container image to Cloud Run
- name: 'gcr.io/cloud-builders/gcloud'
args:
- 'run'
- 'deploy'
- 'playwright-mcp-http-server'
- '--image'
- 'gcr.io/$PROJECT_ID/playwright-mcp-http-server:$SHORT_SHA'
- '--region'
- 'us-central1'
- '--platform'
- 'managed'
- '--allow-unauthenticated'
- '--port'
- '8931'
- '--memory'
- '2Gi'
- '--cpu'
- '2'
- '--timeout'
- '300'
- '--max-instances'
- '10'
- '--set-env-vars'
- 'PLAYWRIGHT_HEADLESS=true,LOG_LEVEL=info'
images:
- 'gcr.io/$PROJECT_ID/playwright-mcp-http-server:$SHORT_SHA'
- 'gcr.io/$PROJECT_ID/playwright-mcp-http-server:latest'
options:
logging: CLOUD_LOGGING_ONLY
machineType: 'E2_HIGHCPU_8'