diff --git a/.github/workflows/docker-client.yml b/.github/workflows/docker-client.yml index a19c22f..c47dbd4 100644 --- a/.github/workflows/docker-client.yml +++ b/.github/workflows/docker-client.yml @@ -32,7 +32,7 @@ on: env: AWS_REGION: us-east-2 # set this to your preferred AWS region, e.g. us-west-1 - ECR_REPOSITORY: currentc # set this to your Amazon ECR repository name + ECR_REPOSITORY: currentc-client # set this to your Amazon ECR repository name ECS_SERVICE: currentC-client-deploy # set this to your Amazon ECS service name ECS_CLUSTER: currentC # set this to your Amazon ECS cluster name ECS_TASK_DEFINITION: @@ -76,8 +76,8 @@ jobs: # push it to ECR so that it can # be deployed to ECS. docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG ./client - docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG - echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT + docker push $ECR_REGISTRY/$ECR_REPOSITORY/:client:$IMAGE_TAG + echo "image=$ECR_REGISTRY/$ECR_REPOSITORY/:client:$IMAGE_TAG" >> $GITHUB_OUTPUT - name: Fill in the new image ID in the Amazon ECS task definition id: task-def diff --git a/.github/workflows/docker-server.yml b/.github/workflows/docker-server.yml index be15ffd..b92f43e 100644 --- a/.github/workflows/docker-server.yml +++ b/.github/workflows/docker-server.yml @@ -32,7 +32,7 @@ on: env: AWS_REGION: us-east-2 # set this to your preferred AWS region, e.g. us-west-1 - ECR_REPOSITORY: currentc # set this to your Amazon ECR repository name + ECR_REPOSITORY: currentc-server # set this to your Amazon ECR repository name ECS_SERVICE: currentC-server-deploy # set this to your Amazon ECS service name ECS_CLUSTER: currentC # set this to your Amazon ECS cluster name ECS_TASK_DEFINITION: @@ -76,8 +76,8 @@ jobs: # push it to ECR so that it can # be deployed to ECS. docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG ./server - docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG - echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT + docker push $ECR_REGISTRY/$ECR_REPOSITORY/:server:$IMAGE_TAG + echo "image=$ECR_REGISTRY/$ECR_REPOSITORY/:server:$IMAGE_TAG" >> $GITHUB_OUTPUT - name: Fill in the new image ID in the Amazon ECS task definition id: task-def diff --git a/.github/workflows/task-definition-server.json b/.github/workflows/task-definition-server.json index 4c1b102..5ebe521 100644 --- a/.github/workflows/task-definition-server.json +++ b/.github/workflows/task-definition-server.json @@ -3,7 +3,7 @@ "containerDefinitions": [ { "name": "currentC-server", - "image": "525357733102.dkr.ecr.us-east-2.amazonaws.com/currentc-server:latest", + "image": "525357733102.dkr.ecr.us-east-2.amazonaws.com/currentc:server", "cpu": 0, "portMappings": [ { diff --git a/.github/workflows/task-definition.json b/.github/workflows/task-definition.json index 5a3c4ac..b252cf8 100644 --- a/.github/workflows/task-definition.json +++ b/.github/workflows/task-definition.json @@ -1,85 +1,80 @@ { - "taskDefinitionArn": "arn:aws:ecs:us-east-2:525357733102:task-definition/currentC-client:1", - "containerDefinitions": [ + "taskDefinitionArn": "arn:aws:ecs:us-east-2:525357733102:task-definition/currentC-client:1", + "containerDefinitions": [ + { + "name": "currentC-client", + "image": "525357733102.dkr.ecr.us-east-2.amazonaws.com/currentc:client", + "cpu": 0, + "portMappings": [ { - "name": "currentC-client", - "image": "525357733102.dkr.ecr.us-east-2.amazonaws.com/currentc-client", - "cpu": 0, - "portMappings": [ - { - "name": "currentc-client-3000-tcp", - "containerPort": 3000, - "hostPort": 3000, - "protocol": "tcp", - "appProtocol": "http" - } - ], - "essential": true, - "environment": [], - "environmentFiles": [], - "mountPoints": [], - "volumesFrom": [], - "ulimits": [], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-create-group": "true", - "awslogs-group": "/ecs/currentC-client", - "awslogs-region": "us-east-2", - "awslogs-stream-prefix": "ecs" - }, - "secretOptions": [] - }, - "systemControls": [] + "name": "currentc-client-3000-tcp", + "containerPort": 3000, + "hostPort": 3000, + "protocol": "tcp", + "appProtocol": "http" } - ], - "family": "currentC-client", - "executionRoleArn": "arn:aws:iam::525357733102: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" + ], + "essential": true, + "environment": [], + "environmentFiles": [], + "mountPoints": [], + "volumesFrom": [], + "ulimits": [], + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-create-group": "true", + "awslogs-group": "/ecs/currentC-client", + "awslogs-region": "us-east-2", + "awslogs-stream-prefix": "ecs" }, - { - "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" + "secretOptions": [] + }, + "systemControls": [] + } + ], + "family": "currentC-client", + "executionRoleArn": "arn:aws:iam::525357733102: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" }, - "registeredAt": "2024-04-17T19:16:15.972Z", - "registeredBy": "arn:aws:iam::525357733102:root", - "tags": [] -} \ No newline at end of file + { + "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-04-17T19:16:15.972Z", + "registeredBy": "arn:aws:iam::525357733102:root", + "tags": [] +}