Layers

How Relight resolves providers per layer - compute, database, DNS, registry.

Overview

Relight uses a layer-based model. Every operation targets a specific layer, and each layer is handled by a provider:

LayerWhat it doesFlag
appContainer deployment and management--compute <name>
dbDatabase provisioning and access--db <name>
dnsDomain and DNS record management--dns <name>
registryContainer image storage(follows app provider)

Provider resolution

When you run a command, Relight resolves which provider handles each required layer using this priority:

  1. Explicit flag - --compute gcp, --db do, --dns cf
  2. Project link - .relight.yaml in the current directory (set by relight deploy)
  3. Config defaults - set with relight providers default
  4. Auto-resolve - if only one configured provider supports the layer, it’s used automatically

Cross-provider stacks

Different layers can use different providers. Common setups:

# App on GCP, database on DigitalOcean, DNS on Cloudflare
relight deploy myapp . --compute gcp --dns cf
relight db create mydb --db do
relight db attach mydb myapp

The .relight.yaml link file remembers the provider choices for each layer so you don’t need to repeat flags:

app: myapp
compute: gcp
dns: cf
db: mydb
dbProvider: do

Registry layer

The registry layer follows the app provider by default. Full-stack providers (gcp, aws, azure) and Cloudflare use their native container registries.

Listing providers by layer

relight providers    # shows all providers with their supported layers