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

Configuration Examples

Example strictops.yml configurations for common use cases

Configuration Examples

This page provides ready-to-use configuration examples for common deployment scenarios.

Minimal Web Application

The simplest configuration for a web frontend. All defaults shown for visibility:

version: 1
services:
  web:
    type: web                 # default, can be omitted
    profile: small            # default, can be omitted
    replicas: 1               # default, can be omitted
    healthcheck_path: /health # default, can be omitted
deploy:
  capacity: serverless        # default, can be omitted
  profile: small              # default, can be omitted
  replicas: 1                 # default, can be omitted
  healthcheck_path: /health   # default, can be omitted
  environments:               # default, can be omitted
    - dev
    - prod
  production:                 # default, can be omitted
    - prod
database:
  enabled: true               # default, can be omitted
monitoring:
  enabled: true               # default, can be omitted

The minimal version of this is:

version: 1
services:
  web:
    type: web

Web App with Custom Domain

Deploy a web app with a custom domain:

version: 1
services:
  web:
    type: web
    profile: medium
    replicas: 2
domain:
  name: www.example.com

API Service

A standalone API:

version: 1
services:
  api:
    type: api
    profile: medium
    replicas: 1               # default, can be omitted
    healthcheck_path: /health # default, can be omitted
    env:
      NODE_ENV: production
    secrets:
      - DATABASE_URL
      - JWT_SECRET
database:
  enabled: true               # default, can be omitted

API with Database and Resources

API service with managed database, storage, and caching:

version: 1
services:
  api:
    type: api
    profile: large
    port: 8000
    healthcheck_path: /health
    links:
      - uploads
      - sessions
    env:
      WORKERS: "4"
    secrets:
      - DATABASE_URL
database:
  enabled: true
storage:
  uploads:
    type: s3
cache:
  sessions:
    type: redis

Full-Stack Application

Frontend + Backend with environment-specific configuration:

version: 1
deploy:
  capacity: serverless        # default, can be omitted
  profile: medium
  replicas: 2
  healthcheck_path: /health   # default, can be omitted
  environments:
    - staging
    - production
  production:
    - production
services:
  frontend:
    type: web                 # default, can be omitted
    links:
      - api
  api:
    type: api
    healthcheck_path: /api/health
    env:
      NODE_ENV: production
      LOG_LEVEL: info
    secrets:
      - DATABASE_URL
      - JWT_SECRET
    environments:
      staging:
        env:
          LOG_LEVEL: debug
      production:
        env:
          LOG_LEVEL: warn
database:
  enabled: true               # default, can be omitted
domain:
  name: app.example.com
monitoring:
  enabled: true               # default, can be omitted
tags:
  team: product

Multiple Services with Worker

Web app, API, and background worker:

version: 1
deploy:
  capacity: serverless        # default, can be omitted
  profile: small              # default, can be omitted
  replicas: 1                 # default, can be omitted
  healthcheck_path: /health   # default, can be omitted
services:
  web:
    type: web                 # default, can be omitted
    links:
      - api
  api:
    type: api
    profile: medium
    healthcheck_path: /health # default, can be omitted
    links:
      - worker
      - jobs
    secrets:
      - DATABASE_URL
      - REDIS_URL
  worker:
    type: worker
    profile: small            # default, can be omitted
    links:
      - jobs
    secrets:
      - DATABASE_URL
      - REDIS_URL
database:
  enabled: true               # default, can be omitted
queues:
  jobs:
    type: standard

Service with Monitoring and Auto-Scaling

API with custom alert thresholds and automatic scaling:

version: 1
services:
  api:
    type: api
    profile: medium
    healthcheck_path: /health
    secrets:
      - DATABASE_URL
database:
  enabled: true
monitoring:
  enabled: true
  alerts:
    cpu_threshold: 70
    memory_threshold: 75
    error_5xx_threshold: 5
  scaling:
    mode: automatic
    min_tasks: 2
    max_tasks: 6

Service with Resource Tags

Add custom tags for cost tracking and organization:

version: 1
services:
  api:
    type: api
tags:
  team: platform
  cost-center: engineering
  project: main-api
  environment: production

On this page