docker-deployment

docker-deployment is a cursor rule for Cursor from madebyaris/poinf-of-sales. It costs 0 tokens per session (7,467 once invoked), scanned C, original, MIT.

A deployment guide for running a point-of-sale system in Docker containers. Docker packages services such as the frontend, backend, and database so they can run together in a controlled environment.

In plain words
What is it for?
Use it to configure Docker Compose environments, run the React frontend, Go backend, and PostgreSQL database together, and prepare the system for production monitoring and restarts.
Why use it?
It explains how development and production setups differ, including live reloading, optimized images, health checks, and restart behavior. This reduces confusion when moving from local development to deployment.

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 - ./database/init:/docker-entrypoint-initdb.d.

Good fit Use it to configure Docker Compose environments, run the React frontend, Go backend, and PostgreSQL database together, and prepare the system for production monitoring and restarts.

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/madebyaris/poinf-of-sales
agentmods
npx agentmods add rules/madebyaris/poinf-of-sales/docker-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 docker-deployment

README.md
[![agentmods](https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/docker-deployment/github.svg)](https://agentmods.dev/rules/madebyaris/poinf-of-sales/docker-deployment)
Your own site
<a href="https://agentmods.dev/rules/madebyaris/poinf-of-sales/docker-deployment"><img src="https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/docker-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 docker-deployment

Your own site · 80×15
<a href="https://agentmods.dev/rules/madebyaris/poinf-of-sales/docker-deployment"><img src="https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/docker-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 7,467 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. 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.07467
Opus 5 $0.00000 $0.03734
Sonnet 5 $0.00000 $0.01493
Haiku 4.5 $0.00000 $0.00747

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

Security

Grade C, and why

docker-deployment scanned grade C with 2 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 11d 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/cache/apk/*

Makes network callslowCapability

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

test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
.cursor/rules/docker-deployment.mdc · 1,151 lines

How it starts

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

🐳 Docker & Production Deployment Guide

Container Architecture

Service Overview

The POS system uses a multi-container architecture defined in docker-compose.yml:

  1. postgres - PostgreSQL database with persistent storage
  2. backend - Golang API server with database connectivity
  3. frontend - React application served via Nginx

Container Networking

All services communicate through the pos-network bridge network:

  • Frontend → Backend: HTTP API calls
  • Backend → Database: PostgreSQL connection
  • External access via exposed ports

Development vs Production

Development Configuration

Use docker-compose.dev.yml for development:

docker-compose -f docker-compose.dev.yml up

Development Features:

  • Volume mounts for live code reloading
  • Development-specific environment variables
  • Hot reloading for both frontend (Vite) and backend (Air)
  • Debug logging enabled

Production Configuration

Use docker-compose.yml for production:

docker-compose up -d

Production Features:

  • Optimized multi-stage builds
  • Minimal runtime containers (Alpine-based)
  • Health checks and restart policies
  • Production-ready Nginx configuration

Dockerfile Patterns

Backend Dockerfile

Multi-stage build pattern in backend/Dockerfile:

# Build stage - full Go toolchain
FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o main .

# Production stage - minimal runtime
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /app/main .
EXPOSE 8080
CMD ["./main"]

Frontend Dockerfile

Node.js build with Nginx serving in frontend/Dockerfile:

# Build stage
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build

# Production stage - Nginx
FROM nginx:alpine AS production
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 3000
CMD ["nginx", "-g", "daemon off;"]

Read the full file on GitHub · 1,151 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. 11d ago First seen · 1,151 lines · 0 tokens per session scan C f3968b7cda37

Subscribe to this mod's changes

docker-deployment is a cursor rule published in the GitHub repository madebyaris/poinf-of-sales (142 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 7,467 tokens. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.