Skip to content

chore: DB 이미지 경량화 및 배포 후 docker prune 필터 제거#208

Merged
yyuneu merged 1 commit into
mainfrom
develop
Jun 11, 2026
Merged

chore: DB 이미지 경량화 및 배포 후 docker prune 필터 제거#208
yyuneu merged 1 commit into
mainfrom
develop

Conversation

@yyuneu

@yyuneu yyuneu commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

  • infra/Dockerfile: pgvector를 소스 빌드(build-essential/clang/llvm/git)에서 PGDG apt 패키지(postgresql-16-pgvector)로 교체 → db 이미지 3GB → ~900MB 예상
  • deploy.yml: docker image prune에서 --filter until=168h 제거 → 배포 주기(~6일)가 필터(7일)보다 짧아 dangling 이미지가 누적되던 버그 수정

배경

서버 디스크가 97%까지 차 SSH 속도 저하/불안정 발생. 진단 결과 dangling 이미지 22개(~6GB)가 /var/lib/containerd에 누적된 것이 원인. prune 필터 때문에 6일 전 이미지(144h)가 168h 기준에 안 걸려 계속 남아있었음.

Summary by CodeRabbit

  • Chores
    • Docker 이미지 정리 프로세스 개선으로 미사용 이미지 제거 범위 확대
    • 데이터베이스 확장 모듈 설치 방식을 소스 빌드에서 패키지 기반으로 변경하여 배포 효율성 개선

@yyuneu yyuneu merged commit e001fa0 into main Jun 11, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a630d953-ddd7-452a-a244-e16c0365147f

📥 Commits

Reviewing files that changed from the base of the PR and between e51c230 and 782951a.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml
  • infra/Dockerfile

검토 개요

이 PR은 배포 인프라의 두 가지 측면을 개선합니다: 배포 후 Docker 이미지 정리 정책을 더욱 적극적으로 변경하고, 컨테이너 기본 이미지에서 pgvector를 소스 빌드에서 사전 컴파일된 apt 패키지로 전환합니다.

변경사항

배포 인프라 최적화

레이어 / 파일 설명
Docker 이미지 정리 정책 변경
.github/workflows/deploy.yml
배포 SSH 스크립트에서 미사용 Docker 이미지를 정리할 때 시간 제한 필터(--filter "until=168h")를 제거하고, 강제 전체 정리(docker image prune -af)로 변경했습니다.
pgvector 설치 방식 최적화
infra/Dockerfile
베이스 이미지의 pgvector를 소스에서 직접 빌드하는 대신 PGDG 공식 apt 패키지(postgresql-16-pgvector)를 사용하여 설치하도록 변경했습니다. 이에 따라 git, make, build-essential 등의 빌드 도구 설치 및 컴파일 단계가 제거되었습니다.

관련 PR 목록

검토 예상 시간

🎯 2 (Simple) | ⏱️ ~10 분


🐰 배포 정리는 더욱 깔끔하게,
pgvector는 패키지로 가볍게,
빌드 도구는 더는 필요 없어,
이미지 작아지니 참 좋네!
인프라 최적화, 이제 완벽해! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant