Skip to content

[박린] sprint8#271

Open
boolynn17 wants to merge 39 commits into
codeit-bootcamp-spring:박린from
boolynn17:sprint8
Open

[박린] sprint8#271
boolynn17 wants to merge 39 commits into
codeit-bootcamp-spring:박린from
boolynn17:sprint8

Conversation

@boolynn17
Copy link
Copy Markdown
Collaborator

@boolynn17 boolynn17 commented Apr 14, 2026

요구사항

기본

  • Dockerfile 작성
  • 이미지 빌드 및 실행 테스트
  • Docker Compose 구성
  • AWS S3 버킷 구성
  • AWS S3 접근을 위한 IAM 구성
    - [ ] .env 파일 (액세스 키와 시크릿 키 제외)
# postgres
POSTGRES_USER=myuser
POSTGRES_PASSWORD=mypassword
POSTGRES_DB=discodeit

# AWS
AWS_S3_ACCESS_KEY=(지움)
AWS_S3_SECRET_KEY=(지움)
AWS_S3_REGION=ap-northeast-2
AWS_S3_BUCKET=discodeit-binary-content-storage-lynn
  • AWS 테스트
  • AWS S3를 활용한 BinaryContentStorage 고도화
  • AWS RDS 구성
  • AWS ECR 구성
  • AWS ECS 구성

심화

  • 이미지 최적화하기
  • Github Actions를 활용한 CI/CD 파이프라인 구축

스크린샷

RDS

image image

ECR

image

ECS

image - 엔드포인트: 15.164.180.115

VPC

image

IAM

image

멘토에게

  • 셀프 코드 리뷰를 통해 질문 이어가겠습니다.

박린 added 30 commits April 7, 2026 09:39
Copy link
Copy Markdown
Collaborator

@joonfluence joonfluence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 요약

Docker/AWS 인프라 구성 및 CI/CD 파이프라인을 잘 구축하셨습니다. 멀티스테이지 빌드, healthcheck, 환경변수 분리 등 좋은 실践이 보입니다. 다만 **즉시 처리가 필요한 보안 이슈(RSA 개인 키 노출)**를 포함해 몇 가지 개선이 필요합니다.


추가 조치 필요 사항 (라인 코멘트 외)

[P2] AWSCLIV2.pkg — 바이너리 파일 삭제 필요

macOS용 AWS CLI 설치 패키지 바이너리가 리포지토리에 커밋되어 있습니다. 바이너리 파일은 소스 컨트롤에 포함하면 안 됩니다.

  • AWS CLI는 공식 사이트나 brew install awscli로 설치합니다.
  • git rm --cached AWSCLIV2.pkg로 제거 후 .gitignore에 *.pkg 추가를 권장합니다.

Comment thread discodeit-ecs-key.pem
- name: AWS 자격 증명 설정
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 정적 AWS 액세스 키(Long-lived credentials) 사용

GitHub Actions에서는 OIDC를 통한 IAM 역할 연동을 권장합니다. 정적 키는 유출 시 즉각적인 보안 위협이 됩니다.

또한 시크릿 이름 AWS_S3_ACCESS_KEY는 S3 전용인 것처럼 오해를 줍니다. ECR/ECS 작업에도 동일 키를 사용하고 있으므로 AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY처럼 범용 이름으로 변경하는 것을 추천합니다.


echo "NEW_TASK_ARN=$NEW_TASK_ARN" >> $GITHUB_ENV

- name: 기존 서비스 중단 (프리티어 리소스 고려)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 서비스를 desired-count 0으로 줄이면 배포 중 다운타임이 발생합니다.

ECS는 기본적으로 롤링 업데이트를 지원하므로, 이 단계를 제거하고 새 태스크 정의 업데이트 시 바로 --desired-count 1을 유지하는 것을 권장합니다. 또한 배포 후 안정화 대기(aws ecs wait services-stable)를 추가하면 좋습니다.

프리티어 비용 절감이 목적이라면 별도 스케줄 기반으로 down/up을 관리하는 것이 낫습니다.

Comment thread docker-compose.yml Outdated
Comment thread Dockerfile Outdated
Comment thread .github/workflows/test.yml Outdated
Comment thread docker-compose.yml
@boolynn17 boolynn17 force-pushed the sprint8 branch 2 times, most recently from d7613f1 to caddf5c Compare April 22, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants