Supports
Declares optional resources that enhance the app when available. Same schema as requires. Env vars from set_env are only injected when the resource is actually provisioned.
supports:
- type: redis
set_env:
CACHE_URL: $url
USE_CACHE: "1"The literal "1" is injected alongside the dynamic $url -- set_env values without $ are passed through verbatim.
supports entries can also request host capabilities. The capability is optional: when the provider grants it, the entry's set_env vars are injected; when it doesn't, they are simply absent and the app degrades gracefully.
The expected app-side pattern: the app checks for the env var at startup and enables the feature if present. In this example, the app checks CACHE_URL — if it's set, caching is enabled; if Redis wasn't provisioned, the variable is simply absent and the app runs without caching. No conditional logic in the Launchfile.