lagoon-docker-compose-standards

lagoon-docker-compose-standards is a cursor rule for Cursor from abderrahimghazali/cursor-rules. It costs 0 tokens per session (765 once invoked), scanned A, a copy of lagoon-docker-compose-standards, MIT.

A collection of standards for Docker Compose files used with Lagoon, a platform for deploying applications. It checks service labels, Compose versions, mount settings, restart policies, and other deployment configuration.

In plain words
What is it for?
Use it when writing or checking Lagoon Docker Compose files, including service labels, images, environment variables, health checks, networking, and resource settings.
Why use it?
It catches configuration patterns that may prevent proper Lagoon integration or cause avoidable deployment and development issues.

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/abderrahimghazali/cursor-rules/lagoon-docker-compose-standards
Clone the repo
git clone --depth 1 https://github.com/abderrahimghazali/cursor-rules

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 lagoon-docker-compose-standards

README.md
[![agentmods](https://agentmods.dev/badge/rules/abderrahimghazali/cursor-rules/lagoon-docker-compose-standards.svg)](https://agentmods.dev/rules/abderrahimghazali/cursor-rules/lagoon-docker-compose-standards)
Your own site
<a href="https://agentmods.dev/rules/abderrahimghazali/cursor-rules/lagoon-docker-compose-standards"><img src="https://agentmods.dev/badge/rules/abderrahimghazali/cursor-rules/lagoon-docker-compose-standards.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 765 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00765
Opus 5 $0.00000 $0.00382
Sonnet 5 $0.00000 $0.00153
Haiku 4.5 $0.00000 $0.00076

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

Security

Grade A, and why

lagoon-docker-compose-standards 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 4d 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.

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.

Origin

This is a copy

100% identical to lagoon-docker-compose-standards — 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/lagoon-docker-compose-standards.mdc · 92 lines

What it actually says

Lagoon Docker Compose Standards

Ensures proper Docker Compose configuration for Lagoon deployments, following best practices and Lagoon-specific requirements.

actions:

  • type: enforce conditions:

    • pattern: "services:\s+\w+:\s+(?!.*labels:[\s\S]*lagoon)" message: "Add Lagoon labels to service definitions for proper Lagoon integration"

    • pattern: "version:\s*['"]*2" message: "Use Docker Compose format version 3 or higher for compatibility with modern Docker features"

    • pattern: "volumes:\s+[^:]+:\s+(?!.*delegated)" message: "Use 'delegated' mount consistency for better performance on macOS development environments"

    • pattern: "services:\s+\w+:\s+(?!.*restart:)" message: "Define restart policy for services to ensure proper behavior during deployment"

  • type: suggest message: |

    Lagoon Docker Compose Best Practices:

    Service Configuration

    • Define service types via labels (e.g., lagoon.type: nginx)
    • Use proper image naming conventions (e.g., amazeeio/nginx-drupal:latest)
    • Set appropriate environment variables using Lagoon variables
    • Define health checks for critical services
    • Configure proper networking with Lagoon defaults
    • Set resource constraints appropriate for each environment

    Volume Configuration

    • Use named volumes for persistent data
    • Configure appropriate volume mounts with correct permissions
    • Use 'delegated' mount consistency for macOS performance
    • Avoid mounting the entire codebase when possible

    Build Configuration

    • Use build arguments appropriately
    • Define proper Dockerfile paths
    • Use multi-stage builds for smaller images

    Example Service Configuration:

    services:
      nginx:
        build:
          context: .
          dockerfile: nginx.dockerfile
        labels:
          lagoon.type: nginx
          lagoon.persistent: /app/web/sites/default/files/
        volumes:
          - app:/app:delegated
        depends_on:
          - php
        environment:
          LAGOON_ROUTE: ${LAGOON_ROUTE:-http://project.docker.amazee.io}
    
  • type: validate conditions:

    • pattern: "services:\s+cli:\s+(?!.*build:)" message: "CLI service should have proper build configuration for Lagoon compatibility"

    • pattern: "services:\s+\w+:\s+(?!.*depends_on:)" message: "Define service dependencies for proper startup order and container relationships"

    • pattern: "networks:\s+(?!.*default:)" message: "Configure proper network settings for Lagoon compatibility and service communication"

    • pattern: "services:\s+mariadb:\s+(?!.*image:\s+amazeeio\/mariadb)" message: "Use Lagoon-provided MariaDB image for compatibility with Lagoon environment"

    • pattern: "services:\s+\w+:\s+environment:\s+(?!.*\$\{LAGOON)" message: "Use Lagoon environment variables with fallbacks for local development"

metadata: priority: high version: 1.1

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. 4d ago First seen · 92 lines · 0 tokens per session scan A cfa812b1fafc

Subscribe to this mod's changes

lagoon-docker-compose-standards is a cursor rule published in the GitHub repository abderrahimghazali/cursor-rules (2 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 765 tokens. A static security scan graded it A with 0 findings. It is 100% identical to lagoon-docker-compose-standards, differing in 0 lines, and is treated as a copy.