From 3e043eef82c9ddd6a2dc48483ed7ba04190df2b2 Mon Sep 17 00:00:00 2001 From: linxiaoxin Date: Sun, 29 Sep 2024 22:20:08 +0800 Subject: [PATCH] update ecs task definition --- aws/task-definition.json | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/aws/task-definition.json b/aws/task-definition.json index a57d241..9f93193 100644 --- a/aws/task-definition.json +++ b/aws/task-definition.json @@ -1,5 +1,5 @@ { - "taskDefinitionArn": "arn:aws:ecs:ap-southeast-1:730335183958:task-definition/quemistry-ms-quiz:2", + "taskDefinitionArn": "arn:aws:ecs:ap-southeast-1:730335183958:task-definition/quemistry-ms-statistics:1", "containerDefinitions": [ { "name": "statistics_ms", @@ -9,7 +9,7 @@ "memoryReservation": 512, "portMappings": [ { - "name": "statistics_ms-8080-tcp", + "name": "statistics_ms-80-tcp", "containerPort": 80, "hostPort": 80, "protocol": "tcp", @@ -17,34 +17,28 @@ } ], "essential": true, - "environment": [], - "environmentFiles": [], - "mountPoints": [], - "volumesFrom": [], - "secrets": [ + "environment": [ { "name": "DB_URL", "valueFrom": "arn:aws:ssm:ap-southeast-1:730335183958:parameter/cicd/prod/postgre/database/url" }, { "name": "DB_USER", - "valueFrom": "arn:aws:ssm:ap-southeast-1:730335183958:parameter/cicd/prod/postgre/database/quiz-ms/username" + "valueFrom": "arn:aws:ssm:ap-southeast-1:730335183958:parameter/cicd/prod/postgre/database/statistics-ms/username" }, { "name": "DB_PASSWORD", - "valueFrom": "arn:aws:ssm:ap-southeast-1:730335183958:parameter/cicd/prod/postgre/database/quiz-ms/password" - }, - { - "name": "QUESTION_SERVICE_URL", - "valueFrom": "arn:aws:ssm:ap-southeast-1:730335183958:parameter/cicd/prod/api/question-ms/url" + "valueFrom": "arn:aws:ssm:ap-southeast-1:730335183958:parameter/cicd/prod/postgre/database/statistics-ms/password" } ], "ulimits": [], "logConfiguration": { "logDriver": "awslogs", "options": { - "awslogs-group": "/ecs/quemistry-ms-quiz", + "awslogs-group": "/ecs/quemistry-ms-statistics", + "mode": "non-blocking", "awslogs-create-group": "true", + "max-buffer-size": "25m", "awslogs-region": "ap-southeast-1", "awslogs-stream-prefix": "ecs" }, @@ -53,10 +47,10 @@ "systemControls": [] } ], - "family": "quemistry-ms-quiz", - "executionRoleArn": "arn:aws:iam::730335183958:role/EcsFargateExecutionRole", + "family": "quemistry-ms-statistics", + "executionRoleArn": "arn:aws:iam::730335183958:role/ecsTaskExecutionRole", "networkMode": "awsvpc", - "revision": 2, + "revision": 1, "volumes": [], "status": "ACTIVE", "requiresAttributes": [ @@ -73,7 +67,7 @@ "name": "com.amazonaws.ecs.capability.docker-remote-api.1.19" }, { - "name": "com.amazonaws.ecs.capability.docker-remote-api.1.21" + "name": "com.amazonaws.ecs.capability.docker-remote-api.1.28" }, { "name": "ecs.capability.execution-role-ecr-pull" @@ -103,4 +97,4 @@ "operatingSystemFamily": "LINUX" }, "tags": [] -} +} \ No newline at end of file