Skip to content

Commit

Permalink
Put undef foo app
Browse files Browse the repository at this point in the history
  • Loading branch information
reachfh committed Jan 2, 2024
1 parent 92613be commit fa82f16
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ecs/appspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 0.0
Resources:
- TargetService:
Type: AWS::ECS::Service
Properties:
TaskDefinition: "<TASK_DEFINITION>"
LoadBalancerInfo:
ContainerName: "foo-app"
ContainerPort: 4000
PlatformVersion: "LATEST"
125 changes: 125 additions & 0 deletions ecs/task-definition.json.jq
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"family": "foo-api",
"taskRoleArn": env.TASK_ROLE_ARN,
"executionRoleArn": env.EXECUTION_ROLE_ARN,
"networkMode": "awsvpc",
"cpu": "256",
"memory": "512",
"requiresCompatibilities": ["FARGATE"],
"runtimePlatform": {"cpuArchitecture": "X86_64"},
"containerDefinitions": [
{
"cpu": 0,
"dependsOn": [
{
"containerName": "aws-otel-collector",
"condition": "START"
}
],
"environment": [
{
"name": "GITHUB_SHA",
"value": env.GITHUB_SHA
},
{
"name": "GITHUB_HEAD_REF",
"value": env.GITHUB_HEAD_REF
},
{
"name": "LIBCLUSTER_STRATEGY",
"value": "dns"
},
{
"name": "OTEL_EXPORTER_OTLP_ENDPOINT",
"value": "http://localhost:4317"
},
{
"name": "OTEL_EXPORTER_OTLP_PROTOCOL",
"value": "grpc"
},
{
"name": "OTEL_RESOURCE_ATTRIBUTES",
"value": "aws.log.group.names=/ecs/foo-api"
},
{
"name": "OTEL_SERVICE_NAME",
"value": "foo-api"
},
{
"name": "ROLES",
"value": "api"
}
],
"essential": true,
"image": "<IMAGE1_NAME>",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-create-group": "true",
"awslogs-group": "/ecs/foo-api",
"awslogs-region": env.AWSLOGS_REGION,
"awslogs-stream-prefix": "foo-api"
}
},
"mountPoints": [],
"name": "foo-api",
"portMappings": [
{
"appProtocol": "http",
"containerPort": 4001,
"hostPort": 4001
}
],
"readonlyRootFilesystem": false,
"entryPoint": ["bin/start-docker"],
"secrets": [
{
"name": "DATABASE_URL",
"valueFrom": "arn:aws:ssm:\(env.AWS_REGION):\(env.AWS_ACCOUNT_ID):parameter/\(env.AWS_PS_PREFIX)/app/db/url"
},
{
"name": "PHX_HOST",
"valueFrom": "arn:aws:ssm:\(env.AWS_REGION):\(env.AWS_ACCOUNT_ID):parameter/\(env.AWS_PS_PREFIX)/app/endpoint/host"
},
{
"name": "RELEASE_COOKIE",
"valueFrom": "arn:aws:ssm:\(env.AWS_REGION):\(env.AWS_ACCOUNT_ID):parameter/\(env.AWS_PS_PREFIX)/app/release_cookie"
},
{
"name": "SECRET_KEY_BASE",
"valueFrom": "arn:aws:ssm:\(env.AWS_REGION):\(env.AWS_ACCOUNT_ID):parameter/\(env.AWS_PS_PREFIX)/app/endpoint/secret_key_base"
}
],
"startTimeout": 30,
"stopTimeout": 30
},
{
"name": "aws-otel-collector",
"image": "\(env.ECR_REGISTRY)/\(env.ECR_IMAGE_OWNER)aws-otel-collector",
"cpu": 0,
"environment": [
{
"name": "AWS_REGION",
"value": env.AWSLOGS_REGION
}
],
"essential": true,
"healthCheck": {
"command": [ "/healthcheck" ],
"interval": 5,
"timeout": 6,
"retries": 5,
"startPeriod": 1
},
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-create-group": "true",
"awslogs-group": "/ecs/ecs-aws-otel-sidecar-collector",
"awslogs-region": env.AWSLOGS_REGION,
"awslogs-stream-prefix": "foo-api"
}
}
}
]
}

0 comments on commit fa82f16

Please sign in to comment.