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

Services

Defining services in StrictOps

Services

A service is a deployable unit of your application. Services are defined in your strictops.yml configuration file and deployed to AWS ECS Fargate.

Defining Services

Services are defined in the services section of strictops.yml:

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
  api:
    type: api
    profile: small            # default, can be omitted
    replicas: 1               # default, can be omitted
    healthcheck_path: /health # default, can be omitted

Each service becomes a separate ECS service with its own task definition, load balancer target group, and CloudWatch log group.

Service Types

TypeDescriptionExposure
webFrontend web applicationPublic (HTTP/HTTPS)
apiBackend API servicePublic (HTTP/HTTPS)
workerBackground workerPrivate (no public access)

If no type is specified, the service defaults to web.

Resource Profiles

Services can specify a resource profile that determines CPU and memory allocation:

ProfilevCPUMemory
small0.25512 MB
medium0.51 GB
large12 GB
services:
  api:
    type: api
    profile: medium

Replicas

Control the number of running instances with the replicas field (1-3):

services:
  api:
    type: api
    replicas: 2

Multiple replicas provide high availability and load distribution.

Services can reference other services or resources using the links field:

services:
  frontend:
    type: web
    links:
      - api
  api:
    type: api
    links:
      - uploads
      - jobs
storage:
  uploads:
    type: s3
queues:
  jobs:
    type: standard

Link targets can be other services, storage buckets, queues, or caches. Linked services can communicate using the service name as the hostname.

Environment Variables and Secrets

Services can define environment variables directly or reference secrets stored in AWS Secrets Manager:

services:
  api:
    type: api
    env:
      NODE_ENV: production
      LOG_LEVEL: info
    secrets:
      - DATABASE_URL
      - API_KEY

See the strictops.yml reference for the complete configuration options.

Relationship to Other Entities

  • Projects contain one or more services
  • Deployments deploy a specific service to a specific environment
  • Environments can override service configuration (env vars, secrets)
  • Resources (storage, queues, caches) can be linked to services
  • Logs are organized by service name in CloudWatch

On this page