-
Notifications
You must be signed in to change notification settings - Fork 16
/
ecs-task-definition.json
145 lines (145 loc) · 3.34 KB
/
ecs-task-definition.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
"containerDefinitions": [
{
"name": "app-server",
"cpu": 0,
"portMappings": [
{
"containerPort": 8080,
"hostPort": 8080,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "TZ",
"value": "Asia/Singapore"
},
{
"name": "NODE_ENV",
"value": "production"
},
{
"name": "DD_SOURCE",
"value": "nodejs"
}
],
"mountPoints": [],
"volumesFrom": [],
"secrets": [
{
"name": "DB_HOST",
"valueFrom": "/app/backend/DB_HOST"
},
{
"name": "DB_NAME",
"valueFrom": "/app/backend/DB_NAME"
},
{
"name": "DB_PASSWORD",
"valueFrom": "/app/backend/DB_PASSWORD"
},
{
"name": "DB_USERNAME",
"valueFrom": "/app/backend/DB_USERNAME"
},
{
"name": "SESSION_SECRET",
"valueFrom": "/app/backend/SESSION_SECRET"
},
{
"name": "DD_API_KEY",
"valueFrom": "/app/backend/DD_API_KEY"
},
{
"name": "DD_SERVICE",
"valueFrom": "/app/backend/DD_SERVICE"
},
{
"name": "DD_TAGS",
"valueFrom": "/app/backend/DD_TAGS"
}
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/application-server",
"awslogs-region": "ap-southeast-1",
"awslogs-stream-prefix": "ecs"
}
}
},
{
"name": "dd-agent",
"image": "public.ecr.aws/datadog/agent:latest",
"cpu": 0,
"portMappings": [
{
"containerPort": 8126,
"hostPort": 8126,
"protocol": "tcp"
}
],
"essential": false,
"environment": [
{
"name": "TZ",
"value": "Asia/Singapore"
},
{
"name": "DD_APM_NON_LOCAL_TRAFFIC",
"value": "true"
},
{
"name": "ECS_FARGATE",
"value": "true"
},
{
"name": "DD_APM_ENABLED",
"value": "true"
},
{
"name": "DD_SITE",
"value": "datadoghq.com"
}
],
"mountPoints": [],
"volumesFrom": [],
"secrets": [
{
"name": "DD_API_KEY",
"valueFrom": "/app/backend/DD_API_KEY"
},
{
"name": "DD_SERVICE",
"valueFrom": "/app/backend/DD_SERVICE"
},
{
"name": "DD_TAGS",
"valueFrom": "/app/backend/DD_TAGS_AGENT"
}
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/dd-agent",
"awslogs-region": "ap-southeast-1",
"awslogs-stream-prefix": "ecs"
}
}
}
],
"family": "application-server",
"networkMode": "awsvpc",
"volumes": [],
"placementConstraints": [],
"runtimePlatform": {
"operatingSystemFamily": "LINUX"
},
"requiresCompatibilities": ["FARGATE"],
"taskRoleArn": "arn:aws:iam::<AWS_ACCOUNT_ID>:role/application-server-role",
"executionRoleArn": "arn:aws:iam::<AWS_ACCOUNT_ID>:role/application-server-role",
"cpu": "512",
"memory": "1024"
}