120-deployment

120-deployment is a cursor rule for Cursor from juandoroteoflesiauni-lang/Market-options-stocks-Scanner. It costs 0 tokens per session (2,044 once invoked), scanned C, original, Apache-2.0.

Deployment rules and Docker configuration for a trading terminal. Docker packages an application and its dependencies into repeatable runtime environments, while the rules separate development, staging, and production.

In plain words
What is it for?
Use them to build a Python backend image, run it as a non-root user, configure dependencies and environment variables, and move from local development to staging and production in controlled steps.
Why use it?
They reduce the chance of sending test code or fake data to a live exchange. Requiring testnet checks before mainnet deployment and keeping secrets out of the image helps limit operational and security mistakes.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them to build a Python backend image, run it as a non-root user, configure dependencies and environment variables, and move from local development to staging and production in controlled steps.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/120-deployment
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/juandoroteoflesiauni-lang/Market-options-stocks-Scanner

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 120-deployment

README.md
[![agentmods](https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/120-deployment/github.svg)](https://agentmods.dev/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/120-deployment)
Your own site
<a href="https://agentmods.dev/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/120-deployment"><img src="https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/120-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 120-deployment

Your own site · 80×15
<a href="https://agentmods.dev/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/120-deployment"><img src="https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/120-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,044 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.02044
Opus 5 $0.00000 $0.01022
Sonnet 5 $0.00000 $0.00409
Haiku 4.5 $0.00000 $0.00204

Measured 12d ago against content hash 51084f500f29, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade C, and why

120-deployment scanned grade C 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 12d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

&& rm -rf /var/lib/apt/lists/*
.cursor/rules/120-deployment.mdc · 318 lines

How it starts

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

🚀 DESPLIEGUE Y PRODUCCIÓN — TRADING TERMINAL

⚠️ REGLA FUNDAMENTAL: TESTNET ANTES DE PRODUCCIÓN

DESARROLLO    → localhost + Binance Testnet + DB local
STAGING       → Servidor + Binance Testnet + DB real (datos fake)
PRODUCCIÓN    → Servidor + Binance Mainnet + DB real (DINERO REAL)

NUNCA pasar directamente de DESARROLLO a PRODUCCIÓN.

🐳 DOCKERFILE — BACKEND

# backend/Dockerfile

# ── Etapa 1: Builder ────────────────────────────────
FROM python:3.11-slim as builder

WORKDIR /app

# Instalar dependencias del sistema
RUN apt-get update && apt-get install -y \
    gcc \
    && rm -rf /var/lib/apt/lists/*

# Copiar e instalar dependencias Python
COPY requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt

# ── Etapa 2: Runtime (imagen final) ─────────────────
FROM python:3.11-slim as runtime

# Crear usuario no-root para seguridad
RUN groupadd -r trading && useradd -r -g trading trading

WORKDIR /app

# Copiar dependencias del builder
COPY --from=builder /root/.local /root/.local

# Copiar código fuente
COPY . .

# Cambiar al usuario no-root
USER trading

# Variables de entorno de runtime (NO secrets aquí)
ENV PYTHONPATH=/app \
    PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1

# Puerto que expone la app
EXPOSE 8000

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
    CMD python -c "import httpx; httpx.get('http://localhost:8000/health')" || exit 1

# Comando de inicio (sin --reload en producción)
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "4"]

🐳 DOCKERFILE — FRONTEND

# frontend/Dockerfile

# ── Etapa 1: Build ──────────────────────────────────
FROM node:20-alpine as builder

WORKDIR /app

COPY package*.json .
RUN npm ci --only=production

COPY . .
RUN npm run build

# ── Etapa 2: Nginx para servir el build ─────────────
FROM nginx:alpine as runtime

# Copiar build de React
COPY --from=builder /app/dist /usr/share/nginx/html

# Configuración de Nginx para SPA (Single Page App)
COPY nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

Read the full file on GitHub · 318 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. 12d ago First seen · 318 lines · 0 tokens per session scan C 51084f500f29

Subscribe to this mod's changes

120-deployment is a cursor rule published in the GitHub repository juandoroteoflesiauni-lang/Market-options-stocks-Scanner (11 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,044 tokens. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.