DevOps v1.0.0

render-infra

Apply Render-specific deployment requirements for Polsia apps, including /health checks and migration strategy.

agentlevier 更新于 2026-07-02 1 浏览
下载 SKILL

技能说明

Apply Render-specific deployment requirements for Polsia apps, including /health checks and migration strategy.

使用场景

Polsia apps deploy to Render. This skill covers platform-specific requirements.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/render-infra
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 18 kB
SKILL.md text/markdown
---
name: render-infra
description: "Apply Render-specific deployment requirements for Polsia apps, including /health checks and migration strategy."
---

# Render Infrastructure

Polsia apps deploy to Render. This skill covers platform-specific requirements.

## Health Check Endpoint (CRITICAL)

Render services are configured with a health check at /health. Your app MUST have this:

app.get('/health', (req, res) => { res.status(200).json({ status: 'ok' }); });

Requirements: Endpoint MUST be at /health (not /api/health). Must respond with HTTP 200. If health check fails, deploy times out after 15 minutes.

## DATABASE_URL Not Available in Build

Render's buildCommand does NOT have access to DATABASE_URL. Run migrations on server startup, not in buildCommand.

NEVER run migrations in Render's buildCommand - it will fail.

## Package.json Rules (CRITICAL)

Required scripts: build and start. If no frontend: "build": "echo 'No build step required'". NEVER remove the build script - deploys will fail.

With frontend: "build": "cd client && npm install --include=dev && npm run build". Use --include=dev because vite/tailwind are devDependencies.

## Filesystem is Ephemeral

Render's filesystem resets on every deploy. NEVER use multer.diskStorage() - files will be LOST. Use R2 proxy for file storage.

## Frontend Build

Create frontend in client/ subdirectory. Serve built files: app.use(express.static('client/dist'));

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。