GCP Cloud Run

GCP Cloud Run

Teaches an AI agent to deploy containerised apps on Google Cloud Run with gcloud, autoscaling, traffic splitting and Terraform, with a Node.js container example.

Skill files7 files

references/

scripts/

templates/

SKILL.md100 lines
1
---
2
name: gcp-cloud-run
3
description: >
4
Deploy containerized applications on Google Cloud Run with automatic scaling,
5
traffic management, and service mesh integration. Use for container-based
6
serverless computing.
7
---
8
9
# GCP Cloud Run
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Google Cloud Run enables deployment of containerized applications at scale without managing infrastructure. Run stateless HTTP containers with automatic scaling from zero to thousands of instances, paying only for compute time consumed.
22
23
## When to Use
24
25
- Microservices and APIs
26
- Web applications and backends
27
- Batch processing jobs
28
- Long-running background workers
29
- CI/CD pipeline integration
30
- Data processing pipelines
31
- WebSocket applications
32
- Multi-language services
33
34
## Quick Start
35
36
Minimal working example:
37
38
```bash
39
# Build container image
40
gcloud builds submit --tag gcr.io/MY_PROJECT_ID/my-app:latest
41
42
# Deploy to Cloud Run
43
gcloud run deploy my-app \
44
--image gcr.io/MY_PROJECT_ID/my-app:latest \
45
--platform managed \
46
--region us-central1 \
47
--memory 512Mi \
48
--cpu 1 \
49
--timeout 3600 \
50
--max-instances 100 \
51
--min-instances 1 \
52
--no-allow-unauthenticated \
53
--set-env-vars NODE_ENV=production,DATABASE_URL=postgresql://...
54
55
# Allow public access
56
gcloud run services add-iam-policy-binding my-app \
57
--platform managed \
58
--region us-central1 \
59
--member=allUsers \
60
--role=roles/run.invoker
61
62
# Get service URL
63
gcloud run services describe my-app \
64
// ... (see reference guides for full implementation)
65
```
66
67
## Reference Guides
68
69
Detailed implementations in the `references/` directory:
70
71
| Guide | Contents |
72
|---|---|
73
| [Cloud Run Deployment with gcloud CLI](references/cloud-run-deployment-with-gcloud-cli.md) | Cloud Run Deployment with gcloud CLI |
74
| [Containerized Application (Node.js)](references/containerized-application-nodejs.md) | Containerized Application (Node.js) |
75
| [Terraform Cloud Run Configuration](references/terraform-cloud-run-configuration.md) | Terraform Cloud Run Configuration |
76
| [Docker Build and Push](references/docker-build-and-push.md) | Docker Build and Push |
77
78
## Best Practices
79
80
### ✅ DO
81
82
- Use container health checks
83
- Set appropriate CPU and memory
84
- Implement graceful shutdown
85
- Use service accounts with least privilege
86
- Monitor with Cloud Logging
87
- Enable Cloud Armor for protection
88
- Use revision management for blue-green deployments
89
- Implement startup and liveness probes
90
91
### ❌ DON'T
92
93
- Store secrets in code
94
- Use default service account
95
- Create stateful applications
96
- Ignore health checks
97
- Deploy without testing
98
- Use excessive resource limits
99
- Store files in container filesystem
100

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…