Overview
Lawn templates use compose files to define how an app runs. These files live in the template's lawn-compose/ directory and aim to be compatible with the Docker Compose Specification.
Lawn extends the format with x-lawn keys for features like health checks, environment metadata, notices, and init files.
A minimal compose file defines at least one service with an image:
services:
app:
image: <image-url>
ports:
- "8080:80"
volumes:
- ./data:/app/data
From there, you can add environment variables, health checks, resource limits, and Lawn-specific extensions. The following pages cover what's supported:
- Format — Compose file structure, value formats, and Compose Specification compatibility
- Extensions — Lawn's
x-lawnextensions for health checks, environment metadata, notices, init files, and directories
FAQ
What happens when a user installs an app?
Lawn creates a separate instance compose file that stores the user's overrides. Each time the app starts, the template and instance files are merged to produce the final configuration. See Merging for details.
What if I use an unsupported field?
Unsupported fields are silently ignored — they won't cause errors, but they have no effect at runtime. See the compatibility table for the full list.
How do I add Lawn-specific features?
Use x-lawn keys in your compose file for health checks, environment metadata, notices, and more. See Extensions.