[
StrictOps
control plane
How It WorksPricingSecurityDocs
Log InGet Started
StrictOps Docs

Environments

Multi-environment deployment support in StrictOps

Environments

Environments let you deploy your application to different stages (production, staging, development) with environment-specific configuration.

Default Environments

If you don't specify environments in your strictops.yml, StrictOps uses these defaults:

  • Environments: dev, prod
  • Production: prod (or production, if present in your environments list)

Defining Environments

Environments are defined in the deploy section of your strictops.yml:

version: 1
deploy:
  environments:               # default: [dev, prod] if omitted
    - staging
    - production
  production:                  # default: [prod, production] filtered to environments list
    - production
services:
  api:
    type: api

The environments array lists all environment names. The production array marks which environments are considered production (affects alerting, safeguards, and stack strategy isolation).

Environment-Specific Configuration

Services can have different configuration per environment:

services:
  api:
    type: api
    env:
      LOG_LEVEL: info
    environments:
      staging:
        env:
          LOG_LEVEL: debug
        secrets:
          - STAGING_API_KEY
      production:
        env:
          LOG_LEVEL: warn
        secrets:
          - PRODUCTION_API_KEY

Environment overrides merge with the base service configuration.

How Environments Work

When you deploy to an environment:

  1. StrictOps reads your strictops.yml configuration
  2. Base service settings are loaded
  3. Environment-specific overrides are applied
  4. A CloudFormation stack is created/updated for that environment

Each environment gets its own:

  • CloudFormation stack
  • ECS service instances
  • Load balancer target group
  • CloudWatch log group

Environment Isolation

Environments are isolated at the infrastructure level:

ResourceIsolation
ECS ServicesSeparate service per environment
CloudFormationSeparate stack per environment
LogsSeparate log group per environment
URLsDifferent service URL per environment

The degree of isolation depends on the stack strategy configured for the project (shared, split, or isolated).

Typical Setup

A common pattern is three environments:

EnvironmentPurpose
devDeveloper testing, frequent deploys
stagingPre-production testing, mirrors production
prodLive customer traffic
deploy:
  environments:
    - dev
    - staging
    - prod
  production:
    - prod

Deployment Targeting

When creating a deployment, specify the target environment:

{
  "serviceId": "api",
  "environment": "staging",
  ...
}

The deployment will use the configuration for that environment.

Relationship to Other Entities

  • Projects define which environments are available
  • Deployments target a specific environment
  • Services can have per-environment configuration overrides
  • Logs are separated by environment
  • Stack Strategies control how environments are grouped into CloudFormation stacks

On this page