render-blueprints
Authors and validates render.yaml Blueprints for Render infrastructure. Use when the user needs to write or edit a render.yaml, wire services together with fromDatabase/fromService/fromGroup, set up projects and environments for multi-service apps, configure preview environments, validate against the schema, or fix immutable field errors. Trigger terms: render.yaml, Blueprint, IaC, fromDatabase, fromService, envVarGroups, previews, projects, environments.
render-oss · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add render-oss/skills --skill render-blueprints技能说明
name: render-blueprints
description: >-
Authors and validates render.yaml Blueprints for Render infrastructure. Use
when the user needs to write or edit a render.yaml, wire services together
with fromDatabase/fromService/fromGroup, set up projects and environments
for multi-service apps, configure preview environments, validate against
the schema, or fix immutable field errors. Trigger terms: render.yaml,
Blueprint, IaC, fromDatabase, fromService, envVarGroups, previews, projects,
environments.
license: MIT
compatibility: >-
Git repository on GitHub, GitLab, or Bitbucket for Blueprint sync. Render CLI
v2.7.0+ recommended for render blueprints validate. IDEs can validate
against the public JSON Schema URL below.
metadata:
author: Render
version: "1.0.0"
category: configuration
Render Blueprints (render.yaml)
Blueprints define Render infrastructure as YAML (commonly render.yaml at the repo root). This skill focuses on authoring, wiring, projects/environments, previews, validation, and immutable fields. Heavy detail lives under references/.
When to Use
Apply this skill when the user:
- Creates or edits a
render.yaml/ Blueprint - Wires databases, private services, or Key Value into app env vars
- Groups services with projects and environments
- Configures preview environments for pull requests
- Validates YAML against Render’s schema or CLI
- Asks what can or cannot change after a resource is created
For end-to-end deploy flows and MCP/CLI operations, see render-deploy. For env var strategy outside Blueprint syntax, see render-env-vars. For Docker-specific Blueprint fields, see render-docker.
Blueprint Structure
Top-level keys
| Key | Purpose |
|---|---|
services | Web, worker, cron, private service, Key Value, static (via web + runtime: static) |
databases | Managed PostgreSQL instances |
envVarGroups | Reusable env var sets attached to services |
projects | Optional grouping; contains environments and service lists |
previews | Defaults for PR preview environments |
A Blueprint may also use patterns like ungrouped resources vs environment-scoped lists, depending on whether you adopt the projects model. Avoid duplicating the same logical resource in multiple places (see references/common-mistakes.md).
Schema and IDE validation
- JSON Schema URL:
https://render.com/schema/render.yaml.json - Configure your editor to associate
render.yamlwith that schema for completions and diagnostics.
Minimal example: web + PostgreSQL
databases:
- name: mydb
plan: basic-256mb
region: oregon
services:
- type: web
name: api
runtime: node
region: oregon
plan: starter
buildCommand: npm ci && npm run build
startCommand: npm start
envVars:
- key: DATABASE_URL
fromDatabase:
name: mydb
property: connectionString
Service Types
type | Role |
|---|---|
web | Public HTTP service (use runtime: static for static sites) |
pserv | Private service (internal HTTP/TCP; not public) |
worker | Long-running background process |
cron | Scheduled job (schedule required) |
keyvalue | Managed Key Value (Redis-compatible); alias redis accepted in Blueprints |
Runtimes
Common runtime values: node, python, go, ruby, rust, elixir, docker, image, static.
docker: Build fromDockerfile(seedockerfilePath,dockerContext,dockerCommand).image: Run a prebuilt container image withimage.urland optionalimage.creds.fromRegistryCreds.static: Static site; requiresstaticPublishPathand build output paths (see references).
Cross-Service Wiring
Service env vars under envVars can pull values from other resources instead of hardcoding secrets. Environment-group variables cannot reference services, databases, or other environment groups.
fromDatabase
Reference a database in databases: by name. Properties include:
connectionString,host,port,user,password,database
fromService
Reference a service by name. Typical properties:
host,port,hostport,connectionString,envVarKey
Which properties are valid depends on target service type (e.g. Key Value vs pserv). See references/wiring-patterns.md.
fromGroup
Attach shared vars from envVarGroups (by group name).
Other env var keys
value: Literal string.generateValue: Let Render generate a random secret (password/API key).sync: Setsync: falsefor secrets that should not sync from repo on every update (see edge cases in wiring reference).
Full patterns and combinations: references/wiring-patterns.md.
Projects and Environments
For multi-service apps, use the projects/environments pattern instead of flat top-level services/databases. This groups all related resources into a single Render project, supports multiple environments (production, staging), and enables environment-scoped configuration.
projects:
- name: my-app
environments:
- name: production
services:
- type: web
name: api
runtime: node
plan: standard
buildCommand: npm ci && npm run build
startCommand: npm start
envVars:
- key: DATABASE_URL
fromDatabase:
name: db
property: connectionString
- key: REDIS_URL
fromService:
type: keyvalue
name: cache
property: connectionString
- key: API_SECRET
sync: false
- type: worker
name: jobs
runtime: node
plan: starter
buildCommand: npm ci
阅读完整来源 ↗