Skip to content

[김혜연] Sprint Mission 11#264

Merged
JiNookk merged 2 commits intocodeit-bootcamp-nodejs:김혜연from
stoneME2:김혜연
Dec 3, 2025

Hidden character warning

The head ref may contain hidden characters: "\uae40\ud61c\uc5f0"
Merged

[김혜연] Sprint Mission 11#264
JiNookk merged 2 commits intocodeit-bootcamp-nodejs:김혜연from
stoneME2:김혜연

Conversation

@stoneME2
Copy link
Collaborator

요구사항

Github Actions 활용

  • 브랜치에 pull request가 발생하면 테스트를 실행하는 액션을 구현해 주세요.
  • main 브랜치에 push가 발생하면 AWS 배포를 진행하는 액션을 구현해 주세요.
  • 개인 Github 리포지터리에서 Actions 동작을 확인해 보세요.

Docker 이미지 만들기

  • Express 서버를 실행하는 Dockerfile을 작성해 주세요.
  • Express 서버가 파일 업로드를 처리하는 폴더는 Docker의 Volume을 활용하도록 구현해 주세요.
  • 데이터베이스는 Postgres 이미지를 사용해 연결하도록 구현해 주세요.
  • 실행된 Express 서버 컨테이너는 호스트 머신에서 3000번 포트로 접근 가능하도록 구현해 주세요.

멘토에게

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

@stoneME2 stoneME2 changed the base branch from main to 김혜연 November 28, 2025 00:32
@stoneME2 stoneME2 requested a review from JiNookk November 28, 2025 00:36
@NewL1f3 NewL1f3 added 순한맛🐑 마음이 많이 여립니다.. and removed 순한맛🐑 마음이 많이 여립니다.. labels Nov 28, 2025
Copy link
Collaborator

@JiNookk JiNookk left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~ 코멘트 한번만 확인 부탁드려요!

@@ -0,0 +1,2 @@
node_modules
Copy link
Collaborator

Choose a reason for hiding this comment

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

현재 .env 파일이 제외되지 않아 Docker 이미지에 환경 변수 파일이 포함될 수 있습니다. 보안을 위해 반드시 .env를 추가해주세요.

@@ -0,0 +1,16 @@
FROM node:20
Copy link
Collaborator

Choose a reason for hiding this comment

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

현재 단일 스테이지로 구성되어 있어 최종 이미지에 개발 의존성과 소스 코드가 모두 포함됩니다. 멀티 스테이지 빌드를 적용해 주세요!

depends_on:
- db

postgres:
Copy link
Collaborator

Choose a reason for hiding this comment

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

로컬 개발 환경에서 DB 접속이 필요할 경우를 위해 포트 매핑을 추가하는 것이 좋을 것 같아요!

context: ./mission9
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/express-app:latest
Copy link
Collaborator

Choose a reason for hiding this comment

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

Dockerhub를 이용해서 cd파이프 라인 잘 구현하셨네요!

Copy link
Collaborator

Choose a reason for hiding this comment

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

버전 추적을 용이하게 하려면 github.sha활용해서 버전 태깅 넣어보시는것도 추천드릴게요!

POSTGRES_USER: user_mbti
POSTGRES_PASSWORD: pw_mbti

volumes:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Named Volume을 사용하여 데이터 영속성을 보장한 점이 좋습니다~

@JiNookk JiNookk merged commit e8889a1 into codeit-bootcamp-nodejs:김혜연 Dec 3, 2025
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.

3 participants