Conversation
EC2에서 pnpm install + prisma generate + tsc build를 한 번, Docker 컨테이너 빌드 안에서 또 한 번 수행하던 이중 빌드를 제거. Dockerfile이 이미 멀티스테이지(base/deps/builder/runner)로 install/generate/build를 모두 수행하므로 EC2 빌드 단계는 완전히 중복이었음. ### deploy-develop.yml / deploy-main.yml 공통 - "Install, Generate & Build on server" 단계 삭제 (~80초 절감) - Prisma 마이그레이션은 npx로 prisma CLI를 1회 다운로드해 실행 (컨테이너 runtime엔 prisma가 devDep로 prune되어 없음 — npx가 가장 단순) ### deploy-develop.yml만 - docker system prune -af → prune -f --filter "until=168h"로 완화 (BuildKit layer cache 보존 — 매 배포 cold build 방지) 추정 효과: 3분+ → 1분 30초 ~ 1분 50초 (40~50% 절감)
기존 .dockerignore에 누락된 항목 추가: - .github (워크플로 파일은 컨테이너에 불필요) - *.log (npm-debug 외 일반 로그 패턴) - *.md / docs (README 외 다른 문서) - tests / __tests__ / *.test.ts / *.spec.ts (테스트) - .vscode / .idea (IDE 설정) - swagger.json (컨테이너 빌드 시 재생성) - .env.local / .env.*.local Docker 빌드 컨텍스트 전송 크기와 layer 캐시 무효화 빈도 감소.
[CI] 배포 파이프라인 시간 단축 — 이중 빌드 제거 + prune 완화 + .dockerignore 보강 (#499)
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.
📌 기능 설명
📌 구현 내용
📌 구현 결과
📌 논의하고 싶은 점