Google Cloud Platform 部署
在 GCP 上部署 OpenClaw。
前提条件
- GCP 账号
- gcloud CLI
部署步骤
1. 创建项目
bash
gcloud projects create openclaw-docs --name="OpenClaw Docs"2. 启用服务
bash
gcloud services enable run.googleapis.com
gcloud services enable cloudbuild.googleapis.com3. 部署到 Cloud Run
bash
gcloud run deploy openclaw-docs \
--image gcr.io/PROJECT_ID/openclaw-docs \
--platform managed \
--region asia-east1 \
--allow-unauthenticated配置
yaml
# cloudbuild.yaml
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/openclaw-docs', '.']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/openclaw-docs']
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
args: ['gcloud', 'run', 'deploy', 'openclaw-docs', '--image', 'gcr.io/$PROJECT_ID/openclaw-docs', '--region', 'asia-east1']域名映射
bash
gcloud run domain-mappings create \
--service openclaw-docs \
--region asia-east1 \
--domain docs.your-domain.com