cursorrules / rules
Cursor rule88 starsChanged 13 months agoMITView on GitHub
Standards for Lagoon Docker Compose configuration
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository70 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/accessibility-standards.mdcCursor rule
- .cursor/rules/api-standards.mdcCursor rule
- .cursor/rules/behat-ai-guide.mdcCursor rule
- .cursor/rules/behat-steps.mdcCursor rule
- .cursor/rules/build-optimization.mdcCursor rule
- .cursor/rules/code-generation-standards.mdcCursor rule
- .cursor/rules/confluence-editing-standards.mdcCursor rule
- .cursor/rules/cursor-rules.mdcCursor rule
- .cursor/rules/debugging-standards.mdcCursor rule
- .cursor/rules/docker-compose-standards.mdcCursor rule
- .cursor/rules/drupal-authentication-failures.mdcCursor rule
- .cursor/rules/drupal-broken-access-control.mdcCursor rule
- .cursor/rules/drupal-cryptographic-failures.mdcCursor rule
- .cursor/rules/drupal-database-standards.mdcCursor rule
- .cursor/rules/drupal-file-permissions.mdcCursor rule
- .cursor/rules/drupal-injection.mdcCursor rule
- .cursor/rules/drupal-insecure-design.mdcCursor rule
- .cursor/rules/drupal-integrity-failures.mdcCursor rule
- .cursor/rules/drupal-logging-failures.mdcCursor rule
- .cursor/rules/drupal-security-misconfiguration.mdcCursor rule
- .cursor/rules/drupal-ssrf.mdcCursor rule
- .cursor/rules/drupal-vulnerable-components.mdcCursor rule
- .cursor/rules/generic_bash_style.mdcCursor rule
- .cursor/rules/git-commit-standards.mdcCursor rule
- .cursor/rules/github-actions-standards.mdcCursor rule
- .cursor/rules/improve-cursorrules-efficiency.mdcCursor rule
- .cursor/rules/javascript-broken-access-control.mdcCursor rule
- .cursor/rules/javascript-cryptographic-failures.mdcCursor rule
- .cursor/rules/javascript-identification-authentication-failures.mdcCursor rule
- .cursor/rules/javascript-injection.mdcCursor rule
- .cursor/rules/javascript-insecure-design.mdcCursor rule
- .cursor/rules/javascript-performance.mdcCursor rule
- .cursor/rules/javascript-security-logging-monitoring-failures.mdcCursor rule
- .cursor/rules/javascript-security-misconfiguration.mdcCursor rule
- .cursor/rules/javascript-server-side-request-forgery.mdcCursor rule
- .cursor/rules/javascript-software-data-integrity-failures.mdcCursor rule
- .cursor/rules/javascript-standards.mdcCursor rule
- .cursor/rules/javascript-vulnerable-outdated-components.mdcCursor rule
- .cursor/rules/lagoon-yml-standards.mdcCursor rule
- .cursor/rules/multi-agent-coordination.mdcCursor rule
- .cursor/rules/new-pull-request.mdcCursor rule
- .cursor/rules/node-dependencies.mdcCursor rule
- .cursor/rules/php-drupal-best-practices.mdcCursor rule
- .cursor/rules/php-drupal-development-standards.mdcCursor rule
- .cursor/rules/php-memory-optimisation.mdcCursor rule
- .cursor/rules/project-definition-template.mdcCursor rule
- .cursor/rules/pull-request-changelist-instructions.mdcCursor rule
- .cursor/rules/python-authentication-failures.mdcCursor rule
- .cursor/rules/python-broken-access-control.mdcCursor rule
- .cursor/rules/python-cryptographic-failures.mdcCursor rule
- .cursor/rules/python-injection.mdcCursor rule
- .cursor/rules/python-insecure-design.mdcCursor rule
- .cursor/rules/python-integrity-failures.mdcCursor rule
- .cursor/rules/python-logging-monitoring-failures.mdcCursor rule
- .cursor/rules/python-security-misconfiguration.mdcCursor rule
- .cursor/rules/python-ssrf.mdcCursor rule
- .cursor/rules/python-vulnerable-outdated-components.mdcCursor rule
- .cursor/rules/react-patterns.mdcCursor rule
- The first 60 shown.
The file
We split this lagoon-docker-compose-standards.mdc into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
Use proper image naming conventions (e.g., amazeeio/nginx-drupal:latest)
- Distinctive: line 44
Use named volumes for persistent data
- Distinctive: line 46
Use 'delegated' mount consistency for macOS performance
- Distinctive: line 47
Avoid mounting the entire codebase when possible
- Distinctive: line 50
Use build arguments appropriately
- Distinctive: line 52
Use multi-stage builds for smaller images
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: Standards for Lagoon Docker Compose configuration
globs: docker-compose.yml, docker-compose.*.yml
---
# Lagoon Docker Compose Standards
Ensures proper Docker Compose configuration for Lagoon deployments, following best practices and Lagoon-specific requirements.
<rule>
name: lagoon_docker_compose_standards
description: Enforce standards for Lagoon Docker Compose files
filters:
- type: file_name
pattern: "^docker-compose(\\.\\w+)?\\.yml$"
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:
```yaml
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
</rule> Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

