Configuration

Merging

How Lawn merges template and instance compose files.
Custom templates are not yet supported in the app. For now, we're temporarily curating the catalog. Support for importing and sharing custom templates is coming soon.

Merging & Overrides

When a container starts, Lawn merges the template compose file with the instance override to produce the final configuration. The template defines the baseline. The instance override stores the user's customizations.

By default, maps (like environment) are merged key by key. The instance override's values take precedence. Lists (like volumes) are replaced entirely if present in the override.

Removing a Variable

Set a variable to null in the override to remove it from the merged result:

services:
  app:
    environment:
      UNWANTED_VAR: null

Replacing Entire Values

Use the !override YAML tag to replace a value entirely instead of merging:

services:
  app:
    ports: !override
      - "9090:8080"

Use the !reset tag to remove a value entirely (the property becomes absent, rather than empty):

services:
  app:
    volumes: !reset

Variable Resolution

Template variables declared in x-lawn.variables are resolved at install time. The values are stored in the instance override and substituted into environment variables at container start using ${VAR:-default} syntax.

What Users Can Override

Through the Lawn UI or CLI, users can customize:

SettingHow it's stored
Environment variablesservices.<name>.environment entries
Port mappingsservices.<name>.ports entries
Memory limitsservices.<name>.deploy.resources.limits.memory
Instance namex-lawn.instance.name
Auto-startx-lawn.instance.autoStart
Dismissed noticesx-lawn.instance.dismissedNoticeIds