Skip to content

[박재성] sprint11#84

Merged
O-Seonsik merged 4 commits into
codeit-bootcamp-nodejs:박재성from
qkrwotjd1731:박재성-sprint11
Oct 21, 2025

Hidden character warning

The head ref may contain hidden characters: "\ubc15\uc7ac\uc131-sprint11"
Merged

[박재성] sprint11#84
O-Seonsik merged 4 commits into
codeit-bootcamp-nodejs:박재성from
qkrwotjd1731:박재성-sprint11

Conversation

@qkrwotjd1731
Copy link
Copy Markdown

@qkrwotjd1731 qkrwotjd1731 commented Oct 16, 2025

✅ 요구사항

Github Actions 활용

  • 브랜치에 pull request가 발생하면 테스트를 실행하는 액션을 구현해 주세요.

    • .github/workflows/test.yml
    • PostgreSQL 컨테이너를 사용한 테스트 실행
    • Pull Request 시 자동으로 테스트 및 커버리지 수집
  • main 브랜치에 push가 발생하면 AWS 배포를 진행하는 액션을 구현해 주세요.

    • .github/workflows/deploy.yml
    • EC2 SSH 접속을 통한 자동 배포
    • PM2를 사용한 무중단 재시작
  • 개인 Github 리포지터리에서 Actions 동작을 확인해 보세요.

    • GitHub Secrets 설정: EC2_HOST, EC2_USER, EC2_PRIVATE_KEY

Docker 이미지 만들기

  • Express 서버를 실행하는 Dockerfile을 작성해 주세요.

    • Dockerfile - Node.js 22 빌드, PM2 프로세스 관리
  • Express 서버가 파일 업로드를 처리하는 폴더는 Docker의 Volume을 활용하도록 구현해 주세요.

    • docker-compose.yaml - uploads-volume:/app/uploads 볼륨 사용
  • 데이터베이스는 Postgres 이미지를 사용해 연결하도록 구현해 주세요.

    • PostgreSQL 17.5 이미지 사용, 환경 변수를 통한 연결 설정
  • 실행된 Express 서버 컨테이너는 호스트 머신에서 3000번 포트로 접근 가능하도록 구현해 주세요.

    • docker-compose.yaml - 포트 매핑 3000:3000 설정

참고사항

이번 미션과 별개로 npm run test의 시딩 동시 실행 문제 때문에 globalSetup으로 한번만 시딩되도록 설정하고 테스트코드를 그에 맞게 수정했습니다.

@qkrwotjd1731 qkrwotjd1731 reopened this Oct 16, 2025
@qkrwotjd1731 qkrwotjd1731 reopened this Oct 16, 2025
@qkrwotjd1731 qkrwotjd1731 reopened this Oct 16, 2025
@qkrwotjd1731 qkrwotjd1731 changed the base branch from main to 박재성 October 16, 2025 02:52
@qkrwotjd1731 qkrwotjd1731 reopened this Oct 16, 2025
Comment thread Dockerfile
FROM node:${NODE_VERSION}-slim AS runtime

# openssl 설치
RUN apt-get update -y && apt-get install -y openssl
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.

이거 중복 될 필요 없을 것 같은데 혹시 다른 이유가 있었나요 ??

@O-Seonsik O-Seonsik merged commit 7d55f43 into codeit-bootcamp-nodejs:박재성 Oct 21, 2025
1 check passed
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