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:
Each service becomes a separate ECS service with its own task definition, load balancer target group, and CloudWatch log group.
Service Types
| Type | Description | Exposure |
|---|---|---|
web | Frontend web application | Public (HTTP/HTTPS) |
api | Backend API service | Public (HTTP/HTTPS) |
worker | Background worker | Private (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:
| Profile | vCPU | Memory |
|---|---|---|
small | 0.25 | 512 MB |
medium | 0.5 | 1 GB |
large | 1 | 2 GB |
Replicas
Control the number of running instances with the replicas field (1-3):
Multiple replicas provide high availability and load distribution.
Service Links
Services can reference other services or resources using the links field:
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:
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