lagoon-docker-compose-standards

A set of checks for Docker Compose files used to deploy applications with Lagoon, a platform for running and managing container-based applications.

In plain words
What is it for?
It checks service labels, Compose versions, restart policies, volume mounts, health checks, environment variables, and networking settings.
Why use it?
It catches configuration choices that can prevent Lagoon deployments from working correctly or make local development slower.

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

Made for: Cursor.

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 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.00765
Opus 5 $0.00000 $0.00382
Sonnet 5 $0.00000 $0.00153
Haiku 4.5 $0.00000 $0.00076

Measured 3d 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 3d 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

Copies of this mod

1 near-identical copy found in the catalogue:

.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. 3d 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 ivangrynenko/cursorrules (88 stars, last pushed 10mo 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.