Skip to content

Commit d57fdbf

Browse files
authored
Merge pull request #25 from topcoder-platform/dev
Root file system fix
2 parents c062879 + c844634 commit d57fdbf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

master_deploy.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,17 @@ ECS_template_create_register() {
307307
template=$(echo $template | jq --arg image $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$AWS_REPOSITORY:$ECS_TAG '.containerDefinitions[0].image=$image')
308308
log "ECR Image name updated"
309309

310+
#Container readonlyRootFilesystem
311+
if [ -z $AWS_ECS_READONLY_ROOTFILESYSTEM ];
312+
then
313+
log "No ECS readonlyRootFilesystem defined. Going with default value as true"
314+
AWS_ECS_READONLY_ROOTFILESYSTEM=true
315+
template=$(echo $template | jq --argjson readonlyRootFilesystem $AWS_ECS_READONLY_ROOTFILESYSTEM '.containerDefinitions[0].readonlyRootFilesystem=$readonlyRootFilesystem')
316+
else
317+
template=$(echo $template | jq --argjson readonlyRootFilesystem $AWS_ECS_READONLY_ROOTFILESYSTEM '.containerDefinitions[0].readonlyRootFilesystem=$readonlyRootFilesystem')
318+
fi
319+
log "ECS readonlyRootFilesystem updated."
320+
310321
#Container Memory reservation
311322
if [ -z $AWS_ECS_CONTAINER_MEMORY_RESERVATION ];
312323
then

0 commit comments

Comments
 (0)