Created
November 29, 2018 16:26
-
-
Save btsuhako/33c1d3d6a2bbee52afa4cf92d3df1f6b to your computer and use it in GitHub Desktop.
ECS service task definition for web application + Datadog APM and logging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ipcMode": null, | |
"executionRoleArn": null, | |
"containerDefinitions": [ | |
{ | |
"dnsSearchDomains": null, | |
"logConfiguration": null, | |
"entryPoint": null, | |
"portMappings": [ | |
{ | |
"hostPort": 0, | |
"protocol": "tcp", | |
"containerPort": 3000 | |
} | |
], | |
"command": null, | |
"linuxParameters": null, | |
"cpu": 0, | |
"environment": [ | |
{ | |
"name": "DD_ENV", | |
"value": "prod" | |
}, | |
{ | |
"name": "DD_SERVICE_NAME", | |
"value": "<MY_SERVICE_NAME>" | |
}, | |
{ | |
"name": "DD_TRACE_AGENT_HOSTNAME", | |
"value": "172.17.0.1" | |
}, | |
{ | |
"name": "NODE_ENV", | |
"value": "production" | |
} | |
], | |
"ulimits": null, | |
"dnsServers": null, | |
"mountPoints": [], | |
"workingDirectory": null, | |
"secrets": null, | |
"dockerSecurityOptions": null, | |
"memory": 256, | |
"memoryReservation": null, | |
"volumesFrom": [], | |
"image": "<MY_APP_IMAGE>", | |
"disableNetworking": null, | |
"interactive": null, | |
"healthCheck": null, | |
"essential": true, | |
"links": null, | |
"hostname": null, | |
"extraHosts": null, | |
"pseudoTerminal": null, | |
"user": null, | |
"readonlyRootFilesystem": null, | |
"dockerLabels": { | |
"com.datadoghq.ad.logs": "[{\"source\": \"nodejs\", \"service\": \"<MY_SERVICE_NAME>\"}]" | |
}, | |
"systemControls": null, | |
"privileged": null, | |
"name": "<APP_CONTAINER_NAME>" | |
}, | |
{ | |
"dnsSearchDomains": null, | |
"logConfiguration": null, | |
"entryPoint": null, | |
"portMappings": [ | |
{ | |
"hostPort": 0, | |
"protocol": "tcp", | |
"containerPort": 80 | |
} | |
], | |
"command": null, | |
"linuxParameters": null, | |
"cpu": 0, | |
"environment": [], | |
"ulimits": null, | |
"dnsServers": null, | |
"mountPoints": [], | |
"workingDirectory": null, | |
"secrets": null, | |
"dockerSecurityOptions": null, | |
"memory": 64, | |
"memoryReservation": null, | |
"volumesFrom": [], | |
"image": "<MY_APP_NGINX_REVERSE_PROXY>", | |
"disableNetworking": null, | |
"interactive": null, | |
"healthCheck": null, | |
"essential": true, | |
"links": [ | |
"<APP_CONTAINER_NAME>" | |
], | |
"hostname": null, | |
"extraHosts": null, | |
"pseudoTerminal": null, | |
"user": null, | |
"readonlyRootFilesystem": null, | |
"dockerLabels": { | |
"com.datadoghq.ad.instances": "[{\"nginx_status_url\": \"http://%%host%%:%%port%%/nginx_status\"}]", | |
"com.datadoghq.ad.check_names": "[\"nginx\"]", | |
"com.datadoghq.ad.init_configs": "[{}]", | |
"com.datadoghq.ad.logs": "[{\"source\": \"nginx\", \"service\": \"<MY_SERVICE_NAME>\"}]" | |
}, | |
"systemControls": null, | |
"privileged": null, | |
"name": "nginx" | |
} | |
], | |
"placementConstraints": [], | |
"memory": "320", | |
"taskRoleArn": "<MY_TASK_ROLE>", | |
"compatibilities": [ | |
"EC2" | |
], | |
"taskDefinitionArn": "<MY_TASK_DEFINITION>", | |
"family": "<MY_TASK_FAMILY>", | |
"requiresAttributes": [ | |
{ | |
"targetId": null, | |
"targetType": null, | |
"value": null, | |
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18" | |
}, | |
{ | |
"targetId": null, | |
"targetType": null, | |
"value": null, | |
"name": "com.amazonaws.ecs.capability.ecr-auth" | |
}, | |
{ | |
"targetId": null, | |
"targetType": null, | |
"value": null, | |
"name": "com.amazonaws.ecs.capability.task-iam-role" | |
} | |
], | |
"pidMode": null, | |
"requiresCompatibilities": [ | |
"EC2" | |
], | |
"networkMode": null, | |
"cpu": null, | |
"revision": 6, | |
"status": "ACTIVE", | |
"volumes": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment