質問編集履歴
2
追加情報
title
CHANGED
File without changes
|
body
CHANGED
@@ -43,4 +43,237 @@
|
|
43
43
|
|
44
44
|
|
45
45
|
**試したこと**
|
46
|
-
色々調べてたら、fargate内のタスク内でのコンテナ同士のやり取りは、ネットワークにlocalhostを指定することでやりとりできるという記事をみたので、nginx.confのupstream configの中のdjangoの部分をlocalhostに変更して再度試したのですが、起動できませんでした。。。(しかし、nginxのログは消えました)
|
46
|
+
色々調べてたら、fargate内のタスク内でのコンテナ同士のやり取りは、ネットワークにlocalhostを指定することでやりとりできるという記事をみたので、nginx.confのupstream configの中のdjangoの部分をlocalhostに変更して再度試したのですが、起動できませんでした。。。(しかし、nginxのログは消えました)
|
47
|
+
|
48
|
+
|
49
|
+
追記:
|
50
|
+
タスク定義の内容
|
51
|
+
```json
|
52
|
+
{
|
53
|
+
"ipcMode": null,
|
54
|
+
"executionRoleArn": "arn:aws:iam::**************:role/ecsTaskExecutionRole",
|
55
|
+
"containerDefinitions": [
|
56
|
+
{
|
57
|
+
"dnsSearchDomains": null,
|
58
|
+
"environmentFiles": null,
|
59
|
+
"logConfiguration": {
|
60
|
+
"logDriver": "awslogs",
|
61
|
+
"secretOptions": null,
|
62
|
+
"options": {
|
63
|
+
"awslogs-group": "/ecs/******************************",
|
64
|
+
"awslogs-region": "ap-northeast-1",
|
65
|
+
"awslogs-stream-prefix": "ecs"
|
66
|
+
}
|
67
|
+
},
|
68
|
+
"entryPoint": null,
|
69
|
+
"portMappings": [
|
70
|
+
{
|
71
|
+
"hostPort": 8000,
|
72
|
+
"protocol": "tcp",
|
73
|
+
"containerPort": 8000
|
74
|
+
}
|
75
|
+
],
|
76
|
+
"command": [
|
77
|
+
"python3",
|
78
|
+
"manage.py",
|
79
|
+
"runserver",
|
80
|
+
"0.0.0.0:8000"
|
81
|
+
],
|
82
|
+
"linuxParameters": null,
|
83
|
+
"cpu": 0,
|
84
|
+
"environment": [],
|
85
|
+
"resourceRequirements": null,
|
86
|
+
"ulimits": null,
|
87
|
+
"dnsServers": null,
|
88
|
+
"mountPoints": [],
|
89
|
+
"workingDirectory": "/usr/src/app/",
|
90
|
+
"secrets": null,
|
91
|
+
"dockerSecurityOptions": null,
|
92
|
+
"memory": null,
|
93
|
+
"memoryReservation": 128,
|
94
|
+
"volumesFrom": [],
|
95
|
+
"stopTimeout": null,
|
96
|
+
"image": "djangoイメージ",
|
97
|
+
"startTimeout": null,
|
98
|
+
"firelensConfiguration": null,
|
99
|
+
"dependsOn": null,
|
100
|
+
"disableNetworking": null,
|
101
|
+
"interactive": null,
|
102
|
+
"healthCheck": {
|
103
|
+
"retries": 10,
|
104
|
+
"command": [
|
105
|
+
"CMD-SHELL",
|
106
|
+
"curl -f http://localhost:8000/"
|
107
|
+
],
|
108
|
+
"timeout": 60,
|
109
|
+
"interval": 5,
|
110
|
+
"startPeriod": 120
|
111
|
+
},
|
112
|
+
"essential": true,
|
113
|
+
"links": null,
|
114
|
+
"hostname": null,
|
115
|
+
"extraHosts": null,
|
116
|
+
"pseudoTerminal": null,
|
117
|
+
"user": null,
|
118
|
+
"readonlyRootFilesystem": null,
|
119
|
+
"dockerLabels": null,
|
120
|
+
"systemControls": null,
|
121
|
+
"privileged": null,
|
122
|
+
"name": "django"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"dnsSearchDomains": null,
|
126
|
+
"environmentFiles": null,
|
127
|
+
"logConfiguration": {
|
128
|
+
"logDriver": "awslogs",
|
129
|
+
"secretOptions": null,
|
130
|
+
"options": {
|
131
|
+
"awslogs-group": "/ecs/******************************",
|
132
|
+
"awslogs-region": "ap-northeast-1",
|
133
|
+
"awslogs-stream-prefix": "ecs"
|
134
|
+
}
|
135
|
+
},
|
136
|
+
"entryPoint": [],
|
137
|
+
"portMappings": [
|
138
|
+
{
|
139
|
+
"hostPort": 80,
|
140
|
+
"protocol": "tcp",
|
141
|
+
"containerPort": 80
|
142
|
+
}
|
143
|
+
],
|
144
|
+
"command": [],
|
145
|
+
"linuxParameters": null,
|
146
|
+
"cpu": 0,
|
147
|
+
"environment": [],
|
148
|
+
"resourceRequirements": null,
|
149
|
+
"ulimits": null,
|
150
|
+
"dnsServers": null,
|
151
|
+
"mountPoints": [],
|
152
|
+
"workingDirectory": null,
|
153
|
+
"secrets": null,
|
154
|
+
"dockerSecurityOptions": null,
|
155
|
+
"memory": null,
|
156
|
+
"memoryReservation": 128,
|
157
|
+
"volumesFrom": [],
|
158
|
+
"stopTimeout": null,
|
159
|
+
"image": "nginxイメージ",
|
160
|
+
"startTimeout": null,
|
161
|
+
"firelensConfiguration": null,
|
162
|
+
"dependsOn": [
|
163
|
+
{
|
164
|
+
"containerName": "django",
|
165
|
+
"condition": "HEALTHY"
|
166
|
+
}
|
167
|
+
],
|
168
|
+
"disableNetworking": null,
|
169
|
+
"interactive": null,
|
170
|
+
"healthCheck": null,
|
171
|
+
"essential": true,
|
172
|
+
"links": [],
|
173
|
+
"hostname": null,
|
174
|
+
"extraHosts": null,
|
175
|
+
"pseudoTerminal": null,
|
176
|
+
"user": null,
|
177
|
+
"readonlyRootFilesystem": null,
|
178
|
+
"dockerLabels": null,
|
179
|
+
"systemControls": null,
|
180
|
+
"privileged": null,
|
181
|
+
"name": "nginx"
|
182
|
+
}
|
183
|
+
],
|
184
|
+
"placementConstraints": [],
|
185
|
+
"memory": "512",
|
186
|
+
"taskRoleArn": null,
|
187
|
+
"compatibilities": [
|
188
|
+
"EC2",
|
189
|
+
"FARGATE"
|
190
|
+
],
|
191
|
+
"taskDefinitionArn": "arn:aws:ecs:******************************",
|
192
|
+
"family": "******************************,
|
193
|
+
"requiresAttributes": [
|
194
|
+
{
|
195
|
+
"targetId": null,
|
196
|
+
"targetType": null,
|
197
|
+
"value": null,
|
198
|
+
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"targetId": null,
|
202
|
+
"targetType": null,
|
203
|
+
"value": null,
|
204
|
+
"name": "ecs.capability.execution-role-awslogs"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
"targetId": null,
|
208
|
+
"targetType": null,
|
209
|
+
"value": null,
|
210
|
+
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
211
|
+
},
|
212
|
+
{
|
213
|
+
"targetId": null,
|
214
|
+
"targetType": null,
|
215
|
+
"value": null,
|
216
|
+
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"targetId": null,
|
220
|
+
"targetType": null,
|
221
|
+
"value": null,
|
222
|
+
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.17"
|
223
|
+
},
|
224
|
+
{
|
225
|
+
"targetId": null,
|
226
|
+
"targetType": null,
|
227
|
+
"value": null,
|
228
|
+
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.21"
|
229
|
+
},
|
230
|
+
{
|
231
|
+
"targetId": null,
|
232
|
+
"targetType": null,
|
233
|
+
"value": null,
|
234
|
+
"name": "ecs.capability.container-health-check"
|
235
|
+
},
|
236
|
+
{
|
237
|
+
"targetId": null,
|
238
|
+
"targetType": null,
|
239
|
+
"value": null,
|
240
|
+
"name": "ecs.capability.container-ordering"
|
241
|
+
},
|
242
|
+
{
|
243
|
+
"targetId": null,
|
244
|
+
"targetType": null,
|
245
|
+
"value": null,
|
246
|
+
"name": "ecs.capability.execution-role-ecr-pull"
|
247
|
+
},
|
248
|
+
{
|
249
|
+
"targetId": null,
|
250
|
+
"targetType": null,
|
251
|
+
"value": null,
|
252
|
+
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
253
|
+
},
|
254
|
+
{
|
255
|
+
"targetId": null,
|
256
|
+
"targetType": null,
|
257
|
+
"value": null,
|
258
|
+
"name": "ecs.capability.task-eni"
|
259
|
+
},
|
260
|
+
{
|
261
|
+
"targetId": null,
|
262
|
+
"targetType": null,
|
263
|
+
"value": null,
|
264
|
+
"name": "******************************"
|
265
|
+
}
|
266
|
+
],
|
267
|
+
"pidMode": null,
|
268
|
+
"requiresCompatibilities": [
|
269
|
+
"FARGATE"
|
270
|
+
],
|
271
|
+
"networkMode": "awsvpc",
|
272
|
+
"cpu": "256",
|
273
|
+
"revision": 8,
|
274
|
+
"status": "ACTIVE",
|
275
|
+
"inferenceAccelerators": null,
|
276
|
+
"proxyConfiguration": null,
|
277
|
+
"volumes": []
|
278
|
+
}
|
279
|
+
```
|
1
誤字の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -43,4 +43,4 @@
|
|
43
43
|
|
44
44
|
|
45
45
|
**試したこと**
|
46
|
-
色々調べてたら、fargate内のタスク内でのコンテナ
|
46
|
+
色々調べてたら、fargate内のタスク内でのコンテナ同士のやり取りは、ネットワークにlocalhostを指定することでやりとりできるという記事をみたので、nginx.confのupstream configの中のdjangoの部分をlocalhostに変更して再度試したのですが、起動できませんでした。。。(しかし、nginxのログは消えました)
|