File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,16 @@ else
283
283
fi
284
284
log " Memory reservation updated"
285
285
286
+ # Container Memory reservation
287
+ if [ -z $AWS_ECS_CONTAINER_CPU ];
288
+ then
289
+ echo " No cpu defined . Going with default value 100"
290
+ AWS_ECS_CONTAINER_CPU=100
291
+ template=$( echo $template | jq --argjson cpu $AWS_ECS_CONTAINER_CPU ' .containerDefinitions[0].cpu=$cpu' )
292
+ else
293
+ template=$( echo $template | jq --argjson cpu $AWS_ECS_CONTAINER_CPU ' .containerDefinitions[0].cpu=$cpu' )
294
+ fi
295
+
286
296
# Port Mapping
287
297
Buffer_portmap=$( echo $AWS_ECS_PORTS | sed ' s/,/ /g' )
288
298
for b1 in $Buffer_portmap ;
@@ -379,15 +389,6 @@ else
379
389
# CONTAINER_CPU
380
390
ECS_NETWORKTYPE=" bridge"
381
391
template=$( echo $template | jq --arg networkMode $ECS_NETWORKTYPE ' .networkMode=$networkMode' )
382
- # Container Memory reservation
383
- if [ -z $AWS_ECS_CONTAINER_CPU ];
384
- then
385
- echo " No cpu defined . Going with default value 100"
386
- AWS_ECS_CONTAINER_CPU=100
387
- template=$( echo $template | jq --argjson cpu $AWS_ECS_CONTAINER_CPU ' .containerDefinitions[0].cpu=$cpu' )
388
- else
389
- template=$( echo $template | jq --argjson cpu $AWS_ECS_CONTAINER_CPU ' .containerDefinitions[0].cpu=$cpu' )
390
- fi
391
392
392
393
# Updating the compatibiltiy
393
394
template=$( echo $template | jq --arg requiresCompatibilities EC2 ' .requiresCompatibilities[0] = $requiresCompatibilities' )
You can’t perform that action at this time.
0 commit comments