diff --git a/.aws/task-definition.json b/.aws/task-definition.json deleted file mode 100644 index 64750d4..0000000 --- a/.aws/task-definition.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "family": "eayni-api", - "containerDefinitions": [ - { - "name": "eayni-apps", - "image": "891377307981.dkr.ecr.eu-west-1.amazonaws.com/eayni-apps:d88b96a36d3562433e2f88af2db345b7500dce91", - "cpu": 0, - "portMappings": [ - { - "name": "8080", - "containerPort": 80, - "hostPort": 80, - "protocol": "tcp", - "appProtocol": "http" - } - ], - "essential": true, - "environment": [ - { - "name": "PORT", - "value": "8080" - } - ], - "mountPoints": [], - "volumesFrom": [], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-create-group": "true", - "awslogs-group": "/ecs/eayni-api", - "awslogs-region": "eu-west-1", - "awslogs-stream-prefix": "ecs" - } - } - } - ], - "executionRoleArn": "arn:aws:iam::891377307981:role/ecsTaskExecutionRole", - "networkMode": "awsvpc", - "requiresCompatibilities": ["FARGATE"], - "cpu": "1024", - "memory": "3072", - "runtimePlatform": { - "cpuArchitecture": "X86_64", - "operatingSystemFamily": "LINUX" - } -} diff --git a/.github/workflows/aws.yml b/.github/workflows/aws.yml index 2fac39c..4f2cb0d 100644 --- a/.github/workflows/aws.yml +++ b/.github/workflows/aws.yml @@ -36,7 +36,7 @@ env: ECS_SERVICE: ${{ secrets.MY_ECS_SERVICE }} # set this to your Amazon ECS service name ECS_CLUSTER: ${{ secrets.MY_ECS_CLUSTER }} # set this to your Amazon ECS cluster name ECS_TASK_DEFINITION: - ${{ secrets.MY_ECS_TASK_DEFINITION }} # set this to the path to your Amazon ECS task definition + task-definition.json # set this to the path to your Amazon ECS task definition # file, e.g. .aws/task-definition.json CONTAINER_NAME: ${{ secrets.MY_CONTAINER_NAME }} # set this to the name of the container in the diff --git a/task-definition.json b/task-definition.json new file mode 100644 index 0000000..f21ee65 --- /dev/null +++ b/task-definition.json @@ -0,0 +1,84 @@ +{ + "taskDefinitionArn": "arn:aws:ecs:eu-west-1:891377307981:task-definition/eayni-api:1", + "containerDefinitions": [ + { + "name": "eayni-apps", + "image": "891377307981.dkr.ecr.eu-west-1.amazonaws.com/eayni-apps", + "cpu": 0, + "portMappings": [ + { + "name": "8080", + "containerPort": 80, + "hostPort": 80, + "protocol": "tcp", + "appProtocol": "http" + } + ], + "essential": true, + "environment": [ + { + "name": "MONGODB_URI", + "value": "mongodb+srv://itsalmah2018:z2CSCuVkRE1QnlIh@eayniserverlessinstance.csggb5o.mongodb.net/eayni" + } + ], + "environmentFiles": [], + "mountPoints": [], + "volumesFrom": [], + "ulimits": [], + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-create-group": "true", + "awslogs-group": "/ecs/eayni-api", + "awslogs-region": "eu-west-1", + "awslogs-stream-prefix": "ecs" + }, + "secretOptions": [] + } + } + ], + "family": "eayni-api", + "executionRoleArn": "arn:aws:iam::891377307981:role/ecsTaskExecutionRole", + "networkMode": "awsvpc", + "revision": 1, + "volumes": [], + "status": "ACTIVE", + "requiresAttributes": [ + { + "name": "com.amazonaws.ecs.capability.logging-driver.awslogs" + }, + { + "name": "ecs.capability.execution-role-awslogs" + }, + { + "name": "com.amazonaws.ecs.capability.ecr-auth" + }, + { + "name": "com.amazonaws.ecs.capability.docker-remote-api.1.19" + }, + { + "name": "ecs.capability.execution-role-ecr-pull" + }, + { + "name": "com.amazonaws.ecs.capability.docker-remote-api.1.18" + }, + { + "name": "ecs.capability.task-eni" + }, + { + "name": "com.amazonaws.ecs.capability.docker-remote-api.1.29" + } + ], + "placementConstraints": [], + "compatibilities": ["EC2", "FARGATE"], + "requiresCompatibilities": ["FARGATE"], + "cpu": "1024", + "memory": "3072", + "runtimePlatform": { + "cpuArchitecture": "X86_64", + "operatingSystemFamily": "LINUX" + }, + "registeredAt": "2024-01-25T13:05:57.248Z", + "registeredBy": "arn:aws:iam::891377307981:root", + "tags": [] +}