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:
| Layer | What it does | Flag |
|---|---|---|
app | Container deployment and management | --compute <name> |
db | Database provisioning and access | --db <name> |
dns | Domain and DNS record management | --dns <name> |
registry | Container image storage | (follows app provider) |
Provider resolution
When you run a command, Relight resolves which provider handles each required layer using this priority:
- Explicit flag -
--compute gcp,--db do,--dns cf - Project link -
.relight.yamlin the current directory (set byrelight deploy) - Config defaults - set with
relight providers default - 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