Skip to content

Commit

Permalink
test2
Browse files Browse the repository at this point in the history
  • Loading branch information
eu2525 committed Nov 20, 2024
1 parent fa2fa8c commit 51cf503
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy_ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: ecs-devops-sandbox-service
cluster: ecs-devops-sandbox-cluster
wait-for-service-stability: true
task-definition: task-definition.json
container-name: dittodining
image: ${{ steps.build-image.outputs.image }}
55 changes: 55 additions & 0 deletions task-definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"containerDefinitions": [
{
"name": "dittodining",
"image": "954976319012.dkr.ecr.ap-northeast-2.amazonaws.com/dittodining:latest",
"cpu": 0,
"portMappings": [
{
"name": "server",
"containerPort": 8080,
"hostPort": 8080,
"protocol": "tcp",
"appProtocol": "http"
},
{
"name": "database",
"containerPort": 3306,
"hostPort": 3306,
"protocol": "tcp",
"appProtocol": "http"
}
],
"essential": true,
"environment": [],
"mountPoints": [],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/dittodining",
"mode": "non-blocking",
"awslogs-create-group": "true",
"max-buffer-size": "25m",
"awslogs-region": "ap-northeast-2",
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"family": "dittodining",
"networkMode": "awsvpc",
"volumes": [],
"placementConstraints": [],
"requiresCompatibilities": [
"EC2"
],
"cpu": "256",
"memory": "256",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
},
"tags": []
}

0 comments on commit 51cf503

Please sign in to comment.