Skip to content

Commit

Permalink
test 123
Browse files Browse the repository at this point in the history
  • Loading branch information
weiwang0305 committed Apr 17, 2024
1 parent 7e00837 commit 78e1a7c
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 87 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/task-definition-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
155 changes: 75 additions & 80 deletions .github/workflows/task-definition.json
Original file line number Diff line number Diff line change
@@ -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": []
}
{
"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": []
}

0 comments on commit 78e1a7c

Please sign in to comment.