deployment-devops

Deployment and DevOps rules for running Kaneo with Docker Compose during development and Kubernetes in production. Docker Compose and Kubernetes are tools for running applications and their supporting services.

In plain words
What is it for?
Use it when configuring PostgreSQL, the API, and the web app, or when preparing development and production deployments.
Why use it?
They provide shared conventions for connecting services, checking database health, and managing dependencies during deployment.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/usekaneo/kaneo/deployment-devops
Clone the repo
git clone --depth 1 https://github.com/usekaneo/kaneo

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,159 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.02159
Opus 5 $0.00000 $0.01079
Sonnet 5 $0.00000 $0.00432
Haiku 4.5 $0.00000 $0.00216

Measured yesterday against content hash abb56273517a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

deployment-devops scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/deployment-devops.mdc · 415 lines

How it starts

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

Deployment & DevOps Guidelines

Kaneo supports multiple deployment methods: Docker Compose for development/testing and Kubernetes for production. This document outlines deployment patterns and best practices.

Docker Compose

Configuration

The main Docker Compose configuration is in compose.yml at the project root.

Service Structure

services:
  postgres:
    image: postgres:16-alpine
    env_file:
      - .env
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U kaneo -d kaneo"]
      interval: 10s
      timeout: 5s
      retries: 5

  api:
    image: ghcr.io/usekaneo/api:latest
    ports:
      - "1337:1337"
    env_file:
      - .env
    depends_on:
      postgres:
        condition: service_healthy
    restart: unless-stopped

  web:
    image: ghcr.io/usekaneo/web:latest
    ports:
      - "5173:5173"
    env_file:
      - .env
    depends_on:
      - api
    restart: unless-stopped

Best Practices

  1. Health Checks: Always include health checks for databases
  2. Dependencies: Use depends_on with condition: service_healthy for databases
  3. Volumes: Use named volumes for persistent data
  4. Restart Policy: Use unless-stopped for production-like behavior
  5. Environment Variables: Use .env file, never hardcode secrets
# Good: Proper health check and dependency
services:
  api:
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U kaneo -d kaneo"]
      interval: 10s
      timeout: 5s
      retries: 5

Kubernetes (Helm Charts)

Chart Structure

Helm charts are located in charts/kaneo/:

charts/kaneo/
├── Chart.yaml              # Chart metadata
├── values.yaml             # Default values
├── README.md               # Chart documentation
└── templates/
    ├── deployment.yaml     # API and Web deployments
    ├── services.yaml       # Service definitions
    ├── ingress.yaml        # Ingress configuration
    ├── postgresql-deployment.yaml  # PostgreSQL deployment
    ├── pvc.yaml            # Persistent volume claims
    ├── hpa.yaml            # Horizontal Pod Autoscaler
    └── serviceaccount.yaml # Service accounts

Read the full file on GitHub · 415 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. yesterday First seen · 415 lines · 0 tokens per session scan A abb56273517a

Subscribe to this mod's changes

deployment-devops is a cursor rule published in the GitHub repository usekaneo/kaneo (8,786 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,159 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.