Deployment
AWS ECS (Fargate)
Prerequisites
ecsTaskExecutionRolewithAmazonECSTaskExecutionRolePolicyattachedecsTaskRole— can be empty for this app (no AWS API calls made)- The OTel gateway must be reachable on port
4318from the ECS task's VPC and security group - Tasks run in
awsvpcnetwork mode; outbound TCP to the gateway must be allowed
1. Build, push to ECR, and register the task definition
export AWS_ACCOUNT_ID=123456789012
export AWS_REGION=eu-west-1
export OTEL_GATEWAY_HOST=otel-gateway.internal # hostname reachable from ECS tasks
./deploy.sh
deploy.sh does three things:
- Builds the image for
linux/amd64and pushes it to ECR - Substitutes
<ACCOUNT_ID>,<REGION>, and<OTEL_GATEWAY_HOST>inecs-task-definition.json - Registers a new task definition revision via the AWS CLI
2. Deploy to your ECS service
aws ecs update-service \
--cluster <your-cluster> \
--service <your-service> \
--task-definition inventory-service \
--region "${AWS_REGION}"
Docker Compose (local)
The SELF_URL environment variable is set to http://app:5000 in Compose so that
the /chain and /burst endpoints can call back to themselves over the internal
Docker network.