Guides
Cloud Run Deployment
Deploy textrawl to Google Cloud Run
Deploy textrawl as a serverless container on Google Cloud Run.
Prerequisites
- Google Cloud account with billing enabled
gcloudCLI installed and authenticated- Docker installed
- Artifact Registry API enabled
Quick Deploy (Recommended)
Use the provided deployment script:
Manual Deployment
1. Set Up Artifact Registry
2. Build and Push
3. Deploy
Tip: For production, pin secrets to specific versions instead of
:latestfor stability (e.g.,textrawl-api-token:1).
Secret Manager
Store secrets in Google Secret Manager:
Grant Cloud Run Access to Secrets
Cloud Run needs permission to read each secret. First, get your project number (not project ID):
Then grant the default Compute Engine service account access to each secret:
Note: PROJECT_NUMBER is a numeric ID (e.g.,
123456789012), different from PROJECT_ID (e.g.,my-project). You can also find it in the Cloud Console under IAM & Admin > Settings.
Configuration
Cloud Run settings:
- Memory: 512MB minimum
- CPU: 1 vCPU
- Max instances: 10 (adjust for traffic)
- Min instances: 0 (scale to zero)
- Timeout: 60s
Custom Domain
Monitoring
View metrics in Cloud Console:
- Request count
- Latency
- Error rate
- Instance count