[정수영] sprint11#220
Open
sooyoungbabo wants to merge 42 commits intocodeit-bootcamp-nodejs:정수영from
Hidden character warning
The head ref may contain hidden characters: "\uc815\uc218\uc601-sprint11"
Open
Conversation
image API 중복코드 제거
KWANHYEONGLEE
approved these changes
Feb 18, 2026
Collaborator
KWANHYEONGLEE
left a comment
There was a problem hiding this comment.
CI/CD 파이프라인 구축 미션 수행하시느라 고생 많으셨습니다! 🚀
이번 미션에서 가장 인상 깊었던 점은 메모리 부족이라는 제약 사항을 파악하고 무작정 빌드를 시도하기보다 로컬 빌드물을 활용하는 방향으로 전략을 세우신 점입니다. 실무에서도 인프라 비용과 자원은 늘 한정되어 있기에, 수영님처럼 문제 원인을 파악하고 대안을 찾는 능력이 매우 중요합니다.
스프린트 미션 진행하시느라 정말 수고 많으셨고 남은 연휴 잘 보내시길 바라겠습니다. LGTM 🍀
Comment on lines
+17
to
+18
| postgres: | ||
| image: postgres:17 # PostgreSQL 15 버전 사용 |
Collaborator
There was a problem hiding this comment.
주석에는 15 버전을 사용한다고 적혀있는데 실제로는 17버전을 사용하고계시네요!
뭐가 맞는걸까요??
Comment on lines
+32
to
+49
| env: | ||
| # PostgreSQL 연결 정보 (Prisma가 이 값을 사용하여 DB 접속) | ||
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/testdb | ||
|
|
||
| # API 기본 주소 및 포트 (예: supertest 등에서 사용) | ||
| BASE_URL: http://localhost:3000 | ||
| PORT: 3000 | ||
| NODE_ENV: test | ||
|
|
||
| # JWT 서명을 위한 시크릿 키 (테스트용 더미 값) | ||
| JWT_ACCESS_TOKEN_SECRET: your-secret-key | ||
| JWT_REFRESH_TOKEN_SECRET: your-refresh-secret-key | ||
|
|
||
| # AWS 관련 설정 - 실제 AWS 리소스를 사용하는 경우에는 Secrets로 값 주입 필요 | ||
| AWS_REGION: ap-northeast-2 | ||
| AWS_ACCESS_KEY_ID: aws-access-key # 실제 키를 넣으면 안 됨 (테스트용 더미 값) | ||
| AWS_SECRET_ACCESS_KEY: aws-secret-access-key # 실제 키를 넣으면 안 됨 | ||
| AWS_BUCKET_NAME: panda-market |
Collaborator
There was a problem hiding this comment.
secrets 값을 직접 주입하지않고 env섹션에서 한 번 정의해서 사용하셨네요! 좋습니다
Comment on lines
+20
to
+27
| script: | | ||
| cd /6-sprint-mission # EC2 인스턴스 내 프로젝트 경로로 진입 | ||
| git pull origin 정수영-sprint11 # 코드 최신화 | ||
| npm ci --omit=dev | ||
| # npm run build # EC2 메모리 부족으로 로컬에서 build한 것 사용 | ||
| npm run prisma:deploy # 예: prisma migrate deploy로 마이그레이션 적용하기 | ||
| pm2 reload mission11 # PM2로 재실행 | ||
| echo "Deployment successful!" |
Collaborator
There was a problem hiding this comment.
지금도 충분히 잘 작성하셨지만 pm2 reload 부분에서 발생할 수 있는 예외 상황을 고려해보면 더 좋은 스크립트가 될 것 같습니다.
PM2 프로세스 부재 시 에러 처리
작성하신 pm2 reload mission11 명령은 현재 mission11이라는 이름으로 돌아가고 있는 프로세스가 없을 경우 에러를 발생시키며 전체 배포 프로세스를 멈추게 합니다. 처음 배포하거나 프로세스가 죽어있을때를 대비하여 아래와 같이 개선해보시면 좋을거같습니다.
pm2 reload mission11 || pm2 start dist/main.js --name mission11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
미션 목표
요구사항
GitHub Actions 활용:
/.github/workflows/test.yml, deploy_AWS.yml
Docker 이미지 만들기
다음을 만족하는 Dockerfile과 docker-compose.yaml 작성
제출
스크린샷
docker image list

docker container list

docker volume list

user3의 3번째 이미지 upload (REST Client)

docker volume 내 user3의 이미지 목록

멘토에게