deployment

deployment is a cursor rule for Cursor from Zenobia0000/cursor-agentic-coding-template. It costs 0 tokens per session (2,808 once invoked), scanned A, a copy of deployment, MIT.

A production-deployment checklist and procedure. Deployment means putting an application where real users can access it, while development and staging are separate environments for building and testing it.

In plain words
What is it for?
Use it when preparing Docker images, configuring application services, checking dependencies such as databases and Redis, and deploying an application to production.
Why use it?
It separates development, staging, and production work and provides checks for containers, services, health monitoring, security, and approval before release.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/health-check.sh green || exit 1.

Good fit Use it when preparing Docker images, configuring application services, checking dependencies such as databases and Redis, and deploying an application to production.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Zenobia0000/cursor-agentic-coding-template
agentmods
npx agentmods add rules/zenobia0000/cursor-agentic-coding-template/deployment

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deployment

README.md
[![agentmods](https://agentmods.dev/badge/rules/zenobia0000/cursor-agentic-coding-template/deployment/github.svg)](https://agentmods.dev/rules/zenobia0000/cursor-agentic-coding-template/deployment)
Your own site
<a href="https://agentmods.dev/rules/zenobia0000/cursor-agentic-coding-template/deployment"><img src="https://agentmods.dev/badge/rules/zenobia0000/cursor-agentic-coding-template/deployment/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deployment

Your own site · 80×15
<a href="https://agentmods.dev/rules/zenobia0000/cursor-agentic-coding-template/deployment"><img src="https://agentmods.dev/badge/rules/zenobia0000/cursor-agentic-coding-template/deployment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,808 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02808
Opus 5.5 $0.00000 $0.01123
Sonnet 5.5 $0.00000 $0.00562
Haiku 4.5 $0.00000 $0.00281

Measured 1mo ago against content hash fc83bf8fee0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deployment scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -f https://api.example.com/health || exit 1
Origin

This is a copy

100% identical to deployment — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/process/deployment.mdc · 478 lines

How it starts

The opening of the file, as written. The whole thing — 478 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🚀 部署策略

環境分層

Development:
  - 本地開發環境
  - 熱重載啟用
  - Debug 模式開啟
  - Mock 資料可用

Staging:
  - 類生產環境
  - 真實資料庫(測試資料)
  - 完整監控
  - 自動部署

Production:
  - 生產環境
  - 高可用架構
  - 完整備援
  - 手動批准部署

🐳 容器化配置

Dockerfile 最佳實踐

# Multi-stage build
FROM node:20-alpine AS builder
WORKDIR /app
# 只複製 package files 優化快取
COPY package*.json ./
RUN npm ci --only=production

# 建構階段
COPY . .
RUN npm run build

# 執行階段 - 最小化映像
FROM node:20-alpine AS runner
WORKDIR /app

# 安全性:非 root 使用者
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001

# 只複製必要檔案
COPY --from=builder --chown=nextjs:nodejs /app/build ./build
COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules

USER nextjs
EXPOSE 3000

# 健康檢查
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  CMD node healthcheck.js

CMD ["node", "build/index.js"]

Docker Compose 配置

version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        - NODE_ENV=production
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_started
    networks:
      - app-network
    restart: unless-stopped
    deploy:
      replicas: 2
      resources:
        limits:
          cpus: '1'
          memory: 512M
        reservations:
          cpus: '0.5'
          memory: 256M

  db:
    image: postgres:15-alpine
    environment:
      POSTGRES_DB: ${DB_NAME}
      POSTGRES_USER: ${DB_USER}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    volumes:
      - postgres-data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
      interval: 10s
      timeout: 5s
      retries: 5

  redis:
    image: redis:7-alpine
    command: redis-server --appendonly yes
    volumes:
      - redis-data:/data

volumes:
  postgres-data:
  redis-data:

networks:
  app-network:
    driver: bridge

Read the full file on GitHub · 478 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 478 lines · 0 tokens per session scan A fc83bf8fee0a

Subscribe to this mod's changes

deployment is a cursor rule published in the GitHub repository Zenobia0000/cursor-agentic-coding-template (5 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,808 tokens. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to deployment, differing in 0 lines, and is treated as a copy.