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.

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.

esc
Type to search the docs