
Devops
- 47 installs
- 16 repo stars
- Updated November 20, 2025
- jackspace/claudeskillz
Deploy and manage infrastructure across Cloudflare (Workers, R2, D1, KV, Pages), Docker containers, and Google Cloud (Compute, GKE, Cloud Run, Storage).
About
A guide for deploying and managing cloud infrastructure across Cloudflare, Docker, and Google Cloud Platform. A developer uses it for serverless edge deploys, containerization, CI/CD pipelines, and multi-region architectures.
- Covers Cloudflare edge, Docker/Kubernetes, and GCP services
- Includes CI/CD setup, cost optimization, and IaC automation
Devops by the numbers
- 47 all-time installs (skills.sh)
- Ranked #745 of 1,438 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/jackspace/claudeskillz --skill devopsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 47 |
|---|---|
| repo stars | ★ 16 |
| Last updated | November 20, 2025 |
| Repository | jackspace/claudeskillz ↗ |
What it does
Deploy and manage infrastructure across Cloudflare (Workers, R2, D1, KV, Pages), Docker containers, and Google Cloud (Compute, GKE, Cloud Run, Storage).
Files
DevOps Skill
Comprehensive guide for deploying and managing cloud infrastructure across Cloudflare edge platform, Docker containerization, and Google Cloud Platform.
When to Use This Skill
Use this skill when:
- Deploying serverless applications to Cloudflare Workers
- Containerizing applications with Docker
- Managing Google Cloud infrastructure with gcloud CLI
- Setting up CI/CD pipelines across platforms
- Optimizing cloud infrastructure costs
- Implementing multi-region deployments
- Building edge-first architectures
- Managing container orchestration with Kubernetes
- Configuring cloud storage solutions (R2, Cloud Storage)
- Automating infrastructure with scripts and IaC
Platform Selection Guide
When to Use Cloudflare
Best For:
- Edge-first applications with global distribution
- Ultra-low latency requirements (<50ms)
- Static sites with serverless functions
- Zero egress cost scenarios (R2 storage)
- WebSocket/real-time applications (Durable Objects)
- AI/ML at the edge (Workers AI)
Key Products:
- Workers (serverless functions)
- R2 (object storage, S3-compatible)
- D1 (SQLite database with global replication)
- KV (key-value store)
- Pages (static hosting + functions)
- Durable Objects (stateful compute)
- Browser Rendering (headless browser automation)
Cost Profile: Pay-per-request, generous free tier, zero egress fees
When to Use Docker
Best For:
- Local development consistency
- Microservices architectures
- Multi-language stack applications
- Traditional VPS/VM deployments
- Kubernetes orchestration
- CI/CD build environments
- Database containerization (dev/test)
Key Capabilities:
- Application isolation and portability
- Multi-stage builds for optimization
- Docker Compose for multi-container apps
- Volume management for data persistence
- Network configuration and service discovery
- Cross-platform compatibility (amd64, arm64)
Cost Profile: Infrastructure cost only (compute + storage)
When to Use Google Cloud
Best For:
- Enterprise-scale applications
- Data analytics and ML pipelines (BigQuery, Vertex AI)
- Hybrid/multi-cloud deployments
- Kubernetes at scale (GKE)
- Managed databases (Cloud SQL, Firestore, Spanner)
- Complex IAM and compliance requirements
Key Services:
- Compute Engine (VMs)
- GKE (managed Kubernetes)
- Cloud Run (containerized serverless)
- App Engine (PaaS)
- Cloud Storage (object storage)
- Cloud SQL (managed databases)
Cost Profile: Varied pricing, sustained use discounts, committed use contracts
Quick Start
Cloudflare Workers
# Install Wrangler CLI
npm install -g wrangler
# Create and deploy Worker
wrangler init my-worker
cd my-worker
wrangler deploySee: references/cloudflare-workers-basics.md
Docker Container
# Create Dockerfile
cat > Dockerfile <<EOF
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]
EOF
# Build and run
docker build -t myapp .
docker run -p 3000:3000 myappSee: references/docker-basics.md
Google Cloud Deployment
# Install and authenticate
curl https://sdk.cloud.google.com | bash
gcloud init
gcloud auth login
# Deploy to Cloud Run
gcloud run deploy my-service \
--image gcr.io/project/image \
--region us-central1See: references/gcloud-platform.md
Reference Navigation
Cloudflare Platform
cloudflare-platform.md- Edge computing overview, key componentscloudflare-workers-basics.md- Getting started, handler types, basic patternscloudflare-workers-advanced.md- Advanced patterns, performance, optimizationcloudflare-workers-apis.md- Runtime APIs, bindings, integrationscloudflare-r2-storage.md- R2 object storage, S3 compatibility, best practicescloudflare-d1-kv.md- D1 SQLite database, KV store, use casesbrowser-rendering.md- Puppeteer/Playwright automation on Cloudflare
Docker Containerization
docker-basics.md- Core concepts, Dockerfile, images, containersdocker-compose.md- Multi-container apps, networking, volumes
Google Cloud Platform
gcloud-platform.md- GCP overview, gcloud CLI, authenticationgcloud-services.md- Compute Engine, GKE, Cloud Run, App Engine
Python Utilities
scripts/cloudflare-deploy.py- Automate Cloudflare Worker deploymentsscripts/docker-optimize.py- Analyze and optimize Dockerfiles
Common Workflows
Edge + Container Hybrid
# Cloudflare Workers (API Gateway)
# -> Docker containers on Cloud Run (Backend Services)
# -> R2 (Object Storage)
# Benefits:
# - Edge caching and routing
# - Containerized business logic
# - Global distributionMulti-Stage Docker Build
# Build stage
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
USER node
CMD ["node", "dist/server.js"]CI/CD Pipeline Pattern
# 1. Build: Docker multi-stage build
# 2. Test: Run tests in container
# 3. Push: Push to registry (GCR, Docker Hub)
# 4. Deploy: Deploy to Cloudflare Workers / Cloud Run
# 5. Verify: Health checks and smoke testsBest Practices
Security
- Run containers as non-root user
- Use service account impersonation (GCP)
- Store secrets in environment variables, not code
- Scan images for vulnerabilities (Docker Scout)
- Use API tokens with minimal permissions
Performance
- Multi-stage Docker builds to reduce image size
- Edge caching with Cloudflare KV
- Use R2 for zero egress cost storage
- Implement health checks for containers
- Set appropriate timeouts and resource limits
Cost Optimization
- Use Cloudflare R2 instead of S3 for large egress
- Implement caching strategies (edge + KV)
- Right-size container resources
- Use sustained use discounts (GCP)
- Monitor usage with cloud provider dashboards
Development
- Use Docker Compose for local development
- Wrangler dev for local Worker testing
- Named gcloud configurations for multi-environment
- Version control infrastructure code
- Implement automated testing in CI/CD
Decision Matrix
| Need | Choose |
|---|---|
| Sub-50ms latency globally | Cloudflare Workers |
| Large file storage (zero egress) | Cloudflare R2 |
| SQL database (global reads) | Cloudflare D1 |
| Containerized workloads | Docker + Cloud Run/GKE |
| Enterprise Kubernetes | GKE |
| Managed relational DB | Cloud SQL |
| Static site + API | Cloudflare Pages |
| WebSocket/real-time | Cloudflare Durable Objects |
| ML/AI pipelines | GCP Vertex AI |
| Browser automation | Cloudflare Browser Rendering |
Resources
- Cloudflare Docs: https://developers.cloudflare.com
- Docker Docs: https://docs.docker.com
- GCP Docs: https://cloud.google.com/docs
- Wrangler CLI: https://developers.cloudflare.com/workers/wrangler/
- gcloud CLI: https://cloud.google.com/sdk/gcloud
Implementation Checklist
Cloudflare Workers
- [ ] Install Wrangler CLI
- [ ] Create Worker project
- [ ] Configure wrangler.toml (bindings, routes)
- [ ] Test locally with
wrangler dev - [ ] Deploy with
wrangler deploy
Docker
- [ ] Write Dockerfile with multi-stage builds
- [ ] Create .dockerignore file
- [ ] Test build locally
- [ ] Push to registry
- [ ] Deploy to target platform
Google Cloud
- [ ] Install gcloud CLI
- [ ] Authenticate with service account
- [ ] Create project and enable APIs
- [ ] Configure IAM permissions
- [ ] Deploy and monitor resources
# DevOps Skill - Environment Variables
# =============================================================================
# Cloudflare Configuration
# =============================================================================
# Get these from: https://dash.cloudflare.com
# API Token: Profile -> API Tokens -> Create Token
# Account ID: Overview -> Account ID (right sidebar)
CLOUDFLARE_API_TOKEN=your_cloudflare_api_token_here
CLOUDFLARE_ACCOUNT_ID=your_cloudflare_account_id_here
# Optional: Specific zone configuration
# CLOUDFLARE_ZONE_ID=your_zone_id_here
# =============================================================================
# Google Cloud Configuration
# =============================================================================
# Authentication via service account key file or gcloud CLI
# Download from: IAM & Admin -> Service Accounts -> Create Key
# Option 1: Service account key file path
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
# Option 2: Project configuration
# GCP_PROJECT_ID=your-project-id
# GCP_REGION=us-central1
# GCP_ZONE=us-central1-a
# =============================================================================
# Docker Configuration
# =============================================================================
# Optional: Docker registry authentication
# Docker Hub
# DOCKER_USERNAME=your_docker_username
# DOCKER_PASSWORD=your_docker_password
# Google Container Registry (GCR)
# GCR_HOSTNAME=gcr.io
# GCR_PROJECT_ID=your-project-id
# AWS ECR
# AWS_ACCOUNT_ID=123456789012
# AWS_REGION=us-east-1
# =============================================================================
# CI/CD Configuration
# =============================================================================
# Optional: For automated deployments
# GitHub Actions
# GITHUB_TOKEN=your_github_token
# GitLab CI
# GITLAB_TOKEN=your_gitlab_token
# =============================================================================
# Monitoring & Logging
# =============================================================================
# Optional: For observability
# Sentry
# SENTRY_DSN=your_sentry_dsn
# Datadog
# DD_API_KEY=your_datadog_api_key
# =============================================================================
# Notes
# =============================================================================
# 1. Copy this file to .env and fill in your actual values
# 2. Never commit .env file to version control
# 3. Use different credentials for dev/staging/production
# 4. Rotate credentials regularly
# 5. Use least-privilege principle for API tokens
{
"description": "Deploy and manage cloud infrastructure on Cloudflare (Workers, R2, D1, KV, Pages, Durable Objects, Browser Rendering), Docker containers, and Google Cloud Platform (Compute Engine, GKE, Cloud Run, App Engine, Cloud Storage). Use when deploying serverless functions to the edge, configuring edge computing solutions, managing Docker containers and images, setting up CI/CD pipelines, optimizing cloud infrastructure costs, implementing global caching strategies, working with cloud databases, or building cloud-native applications.",
"metadata": {
"license": "MIT",
"version": "1.0.0"
},
"references": {
"files": [
"references/browser-rendering.md",
"references/cloudflare-d1-kv.md",
"references/cloudflare-platform.md",
"references/cloudflare-r2-storage.md",
"references/cloudflare-workers-advanced.md",
"references/cloudflare-workers-apis.md",
"references/cloudflare-workers-basics.md",
"references/docker-basics.md",
"references/docker-compose.md",
"references/gcloud-platform.md",
"references/gcloud-services.md"
]
},
"content": "Comprehensive guide for deploying and managing cloud infrastructure across Cloudflare edge platform, Docker containerization, and Google Cloud Platform.\r\n\r\n\r\n### Cloudflare Workers\r\n\r\n```bash\r\nnpm install -g wrangler\r\n\r\nwrangler init my-worker\r\ncd my-worker\r\nwrangler deploy\r\n```\r\n\r\nSee: `references/cloudflare-workers-basics.md`\r\n\r\n### Docker Container\r\n\r\n```bash\r\ncat > Dockerfile <<EOF\r\nFROM node:20-alpine\r\nWORKDIR /app\r\nCOPY package*.json ./\r\nRUN npm ci --production\r\nCOPY . .\r\nEXPOSE 3000\r\nCMD [\"node\", \"server.js\"]\r\nEOF\r\n\r\ndocker build -t myapp .\r\ndocker run -p 3000:3000 myapp\r\n```\r\n\r\nSee: `references/docker-basics.md`\r\n\r\n### Google Cloud Deployment\r\n\r\n```bash\r\ncurl https://sdk.cloud.google.com | bash\r\ngcloud init\r\ngcloud auth login\r\n\r\n\r\n### Edge + Container Hybrid\r\n\r\n```yaml\r\n\r\n```\r\n\r\n### Multi-Stage Docker Build\r\n\r\n```dockerfile\r\nFROM node:20-alpine AS build\r\nWORKDIR /app\r\nCOPY package*.json ./\r\nRUN npm ci\r\nCOPY . .\r\nRUN npm run build\r\n\r\nFROM node:20-alpine\r\nWORKDIR /app\r\nCOPY --from=build /app/dist ./dist\r\nCOPY --from=build /app/node_modules ./node_modules\r\nUSER node\r\nCMD [\"node\", \"dist/server.js\"]\r\n```\r\n\r\n### CI/CD Pipeline Pattern\r\n\r\n```yaml",
"name": "devops",
"id": "devops_mrgoonie",
"sections": {
"Quick Start": "gcloud run deploy my-service \\\r\n --image gcr.io/project/image \\\r\n --region us-central1\r\n```\r\n\r\nSee: `references/gcloud-platform.md`",
"Reference Navigation": "### Cloudflare Platform\r\n- `cloudflare-platform.md` - Edge computing overview, key components\r\n- `cloudflare-workers-basics.md` - Getting started, handler types, basic patterns\r\n- `cloudflare-workers-advanced.md` - Advanced patterns, performance, optimization\r\n- `cloudflare-workers-apis.md` - Runtime APIs, bindings, integrations\r\n- `cloudflare-r2-storage.md` - R2 object storage, S3 compatibility, best practices\r\n- `cloudflare-d1-kv.md` - D1 SQLite database, KV store, use cases\r\n- `browser-rendering.md` - Puppeteer/Playwright automation on Cloudflare\r\n\r\n### Docker Containerization\r\n- `docker-basics.md` - Core concepts, Dockerfile, images, containers\r\n- `docker-compose.md` - Multi-container apps, networking, volumes\r\n\r\n### Google Cloud Platform\r\n- `gcloud-platform.md` - GCP overview, gcloud CLI, authentication\r\n- `gcloud-services.md` - Compute Engine, GKE, Cloud Run, App Engine\r\n\r\n### Python Utilities\r\n- `scripts/cloudflare-deploy.py` - Automate Cloudflare Worker deployments\r\n- `scripts/docker-optimize.py` - Analyze and optimize Dockerfiles",
"Implementation Checklist": "### Cloudflare Workers\r\n- [ ] Install Wrangler CLI\r\n- [ ] Create Worker project\r\n- [ ] Configure wrangler.toml (bindings, routes)\r\n- [ ] Test locally with `wrangler dev`\r\n- [ ] Deploy with `wrangler deploy`\r\n\r\n### Docker\r\n- [ ] Write Dockerfile with multi-stage builds\r\n- [ ] Create .dockerignore file\r\n- [ ] Test build locally\r\n- [ ] Push to registry\r\n- [ ] Deploy to target platform\r\n\r\n### Google Cloud\r\n- [ ] Install gcloud CLI\r\n- [ ] Authenticate with service account\r\n- [ ] Create project and enable APIs\r\n- [ ] Configure IAM permissions\r\n- [ ] Deploy and monitor resources",
"Best Practices": "### Security\r\n- Run containers as non-root user\r\n- Use service account impersonation (GCP)\r\n- Store secrets in environment variables, not code\r\n- Scan images for vulnerabilities (Docker Scout)\r\n- Use API tokens with minimal permissions\r\n\r\n### Performance\r\n- Multi-stage Docker builds to reduce image size\r\n- Edge caching with Cloudflare KV\r\n- Use R2 for zero egress cost storage\r\n- Implement health checks for containers\r\n- Set appropriate timeouts and resource limits\r\n\r\n### Cost Optimization\r\n- Use Cloudflare R2 instead of S3 for large egress\r\n- Implement caching strategies (edge + KV)\r\n- Right-size container resources\r\n- Use sustained use discounts (GCP)\r\n- Monitor usage with cloud provider dashboards\r\n\r\n### Development\r\n- Use Docker Compose for local development\r\n- Wrangler dev for local Worker testing\r\n- Named gcloud configurations for multi-environment\r\n- Version control infrastructure code\r\n- Implement automated testing in CI/CD",
"When to Use This Skill": "Use this skill when:\r\n- Deploying serverless applications to Cloudflare Workers\r\n- Containerizing applications with Docker\r\n- Managing Google Cloud infrastructure with gcloud CLI\r\n- Setting up CI/CD pipelines across platforms\r\n- Optimizing cloud infrastructure costs\r\n- Implementing multi-region deployments\r\n- Building edge-first architectures\r\n- Managing container orchestration with Kubernetes\r\n- Configuring cloud storage solutions (R2, Cloud Storage)\r\n- Automating infrastructure with scripts and IaC",
"Decision Matrix": "| Need | Choose |\r\n|------|--------|\r\n| Sub-50ms latency globally | Cloudflare Workers |\r\n| Large file storage (zero egress) | Cloudflare R2 |\r\n| SQL database (global reads) | Cloudflare D1 |\r\n| Containerized workloads | Docker + Cloud Run/GKE |\r\n| Enterprise Kubernetes | GKE |\r\n| Managed relational DB | Cloud SQL |\r\n| Static site + API | Cloudflare Pages |\r\n| WebSocket/real-time | Cloudflare Durable Objects |\r\n| ML/AI pipelines | GCP Vertex AI |\r\n| Browser automation | Cloudflare Browser Rendering |",
"Platform Selection Guide": "### When to Use Cloudflare\r\n\r\n**Best For:**\r\n- Edge-first applications with global distribution\r\n- Ultra-low latency requirements (<50ms)\r\n- Static sites with serverless functions\r\n- Zero egress cost scenarios (R2 storage)\r\n- WebSocket/real-time applications (Durable Objects)\r\n- AI/ML at the edge (Workers AI)\r\n\r\n**Key Products:**\r\n- Workers (serverless functions)\r\n- R2 (object storage, S3-compatible)\r\n- D1 (SQLite database with global replication)\r\n- KV (key-value store)\r\n- Pages (static hosting + functions)\r\n- Durable Objects (stateful compute)\r\n- Browser Rendering (headless browser automation)\r\n\r\n**Cost Profile:** Pay-per-request, generous free tier, zero egress fees\r\n\r\n### When to Use Docker\r\n\r\n**Best For:**\r\n- Local development consistency\r\n- Microservices architectures\r\n- Multi-language stack applications\r\n- Traditional VPS/VM deployments\r\n- Kubernetes orchestration\r\n- CI/CD build environments\r\n- Database containerization (dev/test)\r\n\r\n**Key Capabilities:**\r\n- Application isolation and portability\r\n- Multi-stage builds for optimization\r\n- Docker Compose for multi-container apps\r\n- Volume management for data persistence\r\n- Network configuration and service discovery\r\n- Cross-platform compatibility (amd64, arm64)\r\n\r\n**Cost Profile:** Infrastructure cost only (compute + storage)\r\n\r\n### When to Use Google Cloud\r\n\r\n**Best For:**\r\n- Enterprise-scale applications\r\n- Data analytics and ML pipelines (BigQuery, Vertex AI)\r\n- Hybrid/multi-cloud deployments\r\n- Kubernetes at scale (GKE)\r\n- Managed databases (Cloud SQL, Firestore, Spanner)\r\n- Complex IAM and compliance requirements\r\n\r\n**Key Services:**\r\n- Compute Engine (VMs)\r\n- GKE (managed Kubernetes)\r\n- Cloud Run (containerized serverless)\r\n- App Engine (PaaS)\r\n- Cloud Storage (object storage)\r\n- Cloud SQL (managed databases)\r\n\r\n**Cost Profile:** Varied pricing, sustained use discounts, committed use contracts",
"Resources": "- **Cloudflare Docs:** https://developers.cloudflare.com\r\n- **Docker Docs:** https://docs.docker.com\r\n- **GCP Docs:** https://cloud.google.com/docs\r\n- **Wrangler CLI:** https://developers.cloudflare.com/workers/wrangler/\r\n- **gcloud CLI:** https://cloud.google.com/sdk/gcloud",
"Common Workflows": "```"
}
}---
name: devops
description: Deploy and manage cloud infrastructure on Cloudflare (Workers, R2, D1, KV, Pages, Durable Objects, Browser Rendering), Docker containers, and Google Cloud Platform (Compute Engine, GKE, Cloud Run, App Engine, Cloud Storage). Use when deploying serverless functions to the edge, configuring edge computing solutions, managing Docker containers and images, setting up CI/CD pipelines, optimizing cloud infrastructure costs, implementing global caching strategies, working with cloud databases, or building cloud-native applications.
license: MIT
version: 1.0.0
---
# DevOps Skill
Comprehensive guide for deploying and managing cloud infrastructure across Cloudflare edge platform, Docker containerization, and Google Cloud Platform.
## When to Use This Skill
Use this skill when:
- Deploying serverless applications to Cloudflare Workers
- Containerizing applications with Docker
- Managing Google Cloud infrastructure with gcloud CLI
- Setting up CI/CD pipelines across platforms
- Optimizing cloud infrastructure costs
- Implementing multi-region deployments
- Building edge-first architectures
- Managing container orchestration with Kubernetes
- Configuring cloud storage solutions (R2, Cloud Storage)
- Automating infrastructure with scripts and IaC
## Platform Selection Guide
### When to Use Cloudflare
**Best For:**
- Edge-first applications with global distribution
- Ultra-low latency requirements (<50ms)
- Static sites with serverless functions
- Zero egress cost scenarios (R2 storage)
- WebSocket/real-time applications (Durable Objects)
- AI/ML at the edge (Workers AI)
**Key Products:**
- Workers (serverless functions)
- R2 (object storage, S3-compatible)
- D1 (SQLite database with global replication)
- KV (key-value store)
- Pages (static hosting + functions)
- Durable Objects (stateful compute)
- Browser Rendering (headless browser automation)
**Cost Profile:** Pay-per-request, generous free tier, zero egress fees
### When to Use Docker
**Best For:**
- Local development consistency
- Microservices architectures
- Multi-language stack applications
- Traditional VPS/VM deployments
- Kubernetes orchestration
- CI/CD build environments
- Database containerization (dev/test)
**Key Capabilities:**
- Application isolation and portability
- Multi-stage builds for optimization
- Docker Compose for multi-container apps
- Volume management for data persistence
- Network configuration and service discovery
- Cross-platform compatibility (amd64, arm64)
**Cost Profile:** Infrastructure cost only (compute + storage)
### When to Use Google Cloud
**Best For:**
- Enterprise-scale applications
- Data analytics and ML pipelines (BigQuery, Vertex AI)
- Hybrid/multi-cloud deployments
- Kubernetes at scale (GKE)
- Managed databases (Cloud SQL, Firestore, Spanner)
- Complex IAM and compliance requirements
**Key Services:**
- Compute Engine (VMs)
- GKE (managed Kubernetes)
- Cloud Run (containerized serverless)
- App Engine (PaaS)
- Cloud Storage (object storage)
- Cloud SQL (managed databases)
**Cost Profile:** Varied pricing, sustained use discounts, committed use contracts
## Quick Start
### Cloudflare Workers
```bash
# Install Wrangler CLI
npm install -g wrangler
# Create and deploy Worker
wrangler init my-worker
cd my-worker
wrangler deploy
```
See: `references/cloudflare-workers-basics.md`
### Docker Container
```bash
# Create Dockerfile
cat > Dockerfile <<EOF
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]
EOF
# Build and run
docker build -t myapp .
docker run -p 3000:3000 myapp
```
See: `references/docker-basics.md`
### Google Cloud Deployment
```bash
# Install and authenticate
curl https://sdk.cloud.google.com | bash
gcloud init
gcloud auth login
# Deploy to Cloud Run
gcloud run deploy my-service \
--image gcr.io/project/image \
--region us-central1
```
See: `references/gcloud-platform.md`
## Reference Navigation
### Cloudflare Platform
- `cloudflare-platform.md` - Edge computing overview, key components
- `cloudflare-workers-basics.md` - Getting started, handler types, basic patterns
- `cloudflare-workers-advanced.md` - Advanced patterns, performance, optimization
- `cloudflare-workers-apis.md` - Runtime APIs, bindings, integrations
- `cloudflare-r2-storage.md` - R2 object storage, S3 compatibility, best practices
- `cloudflare-d1-kv.md` - D1 SQLite database, KV store, use cases
- `browser-rendering.md` - Puppeteer/Playwright automation on Cloudflare
### Docker Containerization
- `docker-basics.md` - Core concepts, Dockerfile, images, containers
- `docker-compose.md` - Multi-container apps, networking, volumes
### Google Cloud Platform
- `gcloud-platform.md` - GCP overview, gcloud CLI, authentication
- `gcloud-services.md` - Compute Engine, GKE, Cloud Run, App Engine
### Python Utilities
- `scripts/cloudflare-deploy.py` - Automate Cloudflare Worker deployments
- `scripts/docker-optimize.py` - Analyze and optimize Dockerfiles
## Common Workflows
### Edge + Container Hybrid
```yaml
# Cloudflare Workers (API Gateway)
# -> Docker containers on Cloud Run (Backend Services)
# -> R2 (Object Storage)
# Benefits:
# - Edge caching and routing
# - Containerized business logic
# - Global distribution
```
### Multi-Stage Docker Build
```dockerfile
# Build stage
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
USER node
CMD ["node", "dist/server.js"]
```
### CI/CD Pipeline Pattern
```yaml
# 1. Build: Docker multi-stage build
# 2. Test: Run tests in container
# 3. Push: Push to registry (GCR, Docker Hub)
# 4. Deploy: Deploy to Cloudflare Workers / Cloud Run
# 5. Verify: Health checks and smoke tests
```
## Best Practices
### Security
- Run containers as non-root user
- Use service account impersonation (GCP)
- Store secrets in environment variables, not code
- Scan images for vulnerabilities (Docker Scout)
- Use API tokens with minimal permissions
### Performance
- Multi-stage Docker builds to reduce image size
- Edge caching with Cloudflare KV
- Use R2 for zero egress cost storage
- Implement health checks for containers
- Set appropriate timeouts and resource limits
### Cost Optimization
- Use Cloudflare R2 instead of S3 for large egress
- Implement caching strategies (edge + KV)
- Right-size container resources
- Use sustained use discounts (GCP)
- Monitor usage with cloud provider dashboards
### Development
- Use Docker Compose for local development
- Wrangler dev for local Worker testing
- Named gcloud configurations for multi-environment
- Version control infrastructure code
- Implement automated testing in CI/CD
## Decision Matrix
| Need | Choose |
|------|--------|
| Sub-50ms latency globally | Cloudflare Workers |
| Large file storage (zero egress) | Cloudflare R2 |
| SQL database (global reads) | Cloudflare D1 |
| Containerized workloads | Docker + Cloud Run/GKE |
| Enterprise Kubernetes | GKE |
| Managed relational DB | Cloud SQL |
| Static site + API | Cloudflare Pages |
| WebSocket/real-time | Cloudflare Durable Objects |
| ML/AI pipelines | GCP Vertex AI |
| Browser automation | Cloudflare Browser Rendering |
## Resources
- **Cloudflare Docs:** https://developers.cloudflare.com
- **Docker Docs:** https://docs.docker.com
- **GCP Docs:** https://cloud.google.com/docs
- **Wrangler CLI:** https://developers.cloudflare.com/workers/wrangler/
- **gcloud CLI:** https://cloud.google.com/sdk/gcloud
## Implementation Checklist
### Cloudflare Workers
- [ ] Install Wrangler CLI
- [ ] Create Worker project
- [ ] Configure wrangler.toml (bindings, routes)
- [ ] Test locally with `wrangler dev`
- [ ] Deploy with `wrangler deploy`
### Docker
- [ ] Write Dockerfile with multi-stage builds
- [ ] Create .dockerignore file
- [ ] Test build locally
- [ ] Push to registry
- [ ] Deploy to target platform
### Google Cloud
- [ ] Install gcloud CLI
- [ ] Authenticate with service account
- [ ] Create project and enable APIs
- [ ] Configure IAM permissions
- [ ] Deploy and monitor resources