diff --git a/.github/workflows/deploy-ecs.yml b/.github/workflows/deploy-ecs.yml index 82de88b..8b810ab 100644 --- a/.github/workflows/deploy-ecs.yml +++ b/.github/workflows/deploy-ecs.yml @@ -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 @@ -141,7 +141,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": ":pepe_cheer: *Gyeongdan FastAPI ${{ github.ref_name }}* 배포가 성공했습니다." + "text": "*Gyeongdan FastAPI ${{ github.ref_name }}* 배포가 성공했습니다." } }, { diff --git a/tf-staging.json b/tf-staging.json new file mode 100644 index 0000000..3a82c74 --- /dev/null +++ b/tf-staging.json @@ -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" + } +}