Blueprints

Manage environments with Blueprints

Deploy one blueprint file to staging, production, and other stacks.

The pattern

Keep one blueprint file. Read an environment variable inside it to select per-environment configuration, then deploy each stack with the environment variable and the --stack flag traveling together. The file stays the source of truth; the variable picks which values to apply.

Add a second stack

Re-run init in the existing directory. It detects the existing blueprint file, skips scaffolding, and goes straight to configuration so you can create or select a stack. Pass . to target the current directory directly:

Deploy each environment

Pass the environment variable and the matching --stack on the same command:

List your stacks at any time:

How targeting works

MechanismWhat it does
--stack <name-or-id>Selects which deployed stack to act on. Available on deploy, plan, info, and logs.
SANITY_ENVA convention read by your file, not by the CLI. Name it whatever you like; the example above reads it to pick config.

--stack never creates a stack

Environment files are not auto-loaded

Other ways to split stacks

Staging and production are the most common reason to run multiple stacks, but not the only one. The same one-file, many-stacks pattern applies when you split by:

  • Content division: one stack per brand or property (artist-1, artist-2).
  • Business area: marketing, sales.
  • Region: a stack per locale or data region.

Pick the dimension that matches how your team is organized, and select it with --stack the same way.

Was this page helpful?