Skip to content

Commit

Permalink
ECS Deploy 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
stopmin committed Jul 8, 2024
1 parent 8d3d828 commit 20c9e1f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
ECR_REPOSITORY: gyeongdan-fastapi # Amazon ECR repository 이름
ECS_SERVICE: GyeongdanFastAPI # Amazon ECS 서비스 이름
ECS_CLUSTER: gyeongdan # Amazon ECS 클러스터 이름
ECS_TASK_DEFINITION: tf-gyeongdan-fastapi.json # Amazon ECS task definition 파일 경로
ECS_TASK_DEFINITION: tf-staging.json # Amazon ECS task definition 파일 경로
CONTAINER_NAME: FastAPI # 컨테이너 이름
PROGRESS_SLACK_CHANNEL: C07BRCDNBMF # Slack 채널 ID

Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":pepe_cheer: *Gyeongdan FastAPI ${{ github.ref_name }}* 배포가 성공했습니다."
"text": "*Gyeongdan FastAPI ${{ github.ref_name }}* 배포가 성공했습니다."
}
},
{
Expand Down
41 changes: 41 additions & 0 deletions tf-staging.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"family": "GyeongdanFastAPI",
"containerDefinitions": [
{
"name": "FastAPI",
"image": "ACCOUNT_ID.dkr.ecr.ap-northeast-2.amazonaws.com/gyeongdan-fastapi:latest",
"cpu": 512,
"memory": 512,
"portMappings": [
{
"containerPort": 8000,
"hostPort": 8000,
"protocol": "tcp"
}
],
"essential": true,
"environment": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/GyeongdanFastAPI",
"awslogs-create-group": "true",
"awslogs-region": "ap-northeast-2",
"awslogs-stream-prefix": "ecs"
}
}
}
],
"taskRoleArn": "arn:aws:iam::ACCOUNT_ID:role/ecsTaskExecutionRole",
"executionRoleArn": "arn:aws:iam::ACCOUNT_ID:role/ecsTaskExecutionRole",
"networkMode": "bridge",
"requiresCompatibilities": [
"EC2"
],
"cpu": "512",
"memory": "512",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
}
}

0 comments on commit 20c9e1f

Please sign in to comment.