Skip to content

[FEAT] Docker 환경 DB 설정 정리#145

Merged
gudals2040 merged 2 commits intodevfrom
feat/144-admin-dashboard-docker
Mar 12, 2026
Merged

[FEAT] Docker 환경 DB 설정 정리#145
gudals2040 merged 2 commits intodevfrom
feat/144-admin-dashboard-docker

Conversation

@sableye9
Copy link
Collaborator

@sableye9 sableye9 commented Mar 11, 2026

관련 이슈

작업 내용

  • DB 초기화 SQL 수정
  • build.gradle 빌드 설정 수정

변경 파일

  • build.gradle
  • compose.yml
  • db/init/001_init.sql

DB 초기화 SQL을 PostgreSQL 환경에 맞게 수정했습니다.


체크 리스트

  • PR 제목 규칙을 준수했습니다
  • 관련 이슈를 연결했습니다
  • 본문 내용을 명확하게 작성했습니다
  • 정상 작동을 로컬 환경에서 검증했습니다

@sableye9 sableye9 changed the title [FEAT] Docker 환경에서 Admin Dashboard 및 DB 설정 정리 [FEAT] Docker 환경 Admin Dashboard 및 DB 설정 정리 Mar 11, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 Docker 환경 설정을 재구성하여 기존 MySQL 데이터베이스를 PostgreSQL (pgvector 확장 포함)로 전환하는 것을 목표로 합니다. 이 변경은 데이터베이스 스키마, Docker Compose 서비스 정의, Spring Boot 애플리케이션 구성 및 빌드 종속성을 포함한 전반적인 데이터베이스 관련 설정을 최적화하여 향상된 기능과 유연성을 제공합니다.

Highlights

  • 데이터베이스 마이그레이션: 기존 MySQL 데이터베이스를 pgvector 확장이 포함된 PostgreSQL로 전환했습니다.
  • Docker Compose 설정 업데이트: PostgreSQL 데이터베이스 서비스 및 LocalStack 서비스 구성을 업데이트하여 새로운 데이터베이스 환경을 지원하도록 했습니다.
  • Spring Boot 애플리케이션 설정: Spring Boot 애플리케이션의 Docker 환경 설정을 PostgreSQL에 맞게 조정하고, 관련 빌드 종속성을 업데이트했습니다.
  • DB 초기화 스크립트 변환: 데이터베이스 초기화 SQL 스크립트(001_init.sql)의 MySQL 특정 구문을 PostgreSQL 호환 구문으로 변환했습니다.
Changelog
  • build.gradle
    • MySQL JDBC 드라이버를 PostgreSQL 드라이버로 교체했습니다.
    • Hibernate Vector 종속성(org.hibernate.orm:hibernate-vector)을 추가했습니다.
    • H2 데이터베이스 의존성을 runtimeOnly에서 testRuntimeOnly로 변경했습니다.
    • 중복된 AWS S3 의존성을 제거했습니다.
  • compose.yml
    • MySQL 서비스를 PostgreSQL 기반의 'db' 서비스로 변경하고 'pgvector/pgvector:pg16' 이미지를 사용하도록 업데이트했습니다.
    • PostgreSQL 환경 변수(POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB)를 설정하고 MySQL 관련 변수를 제거했습니다.
    • 데이터 볼륨 이름을 'mysql_data'에서 'pgdata'로 변경했습니다.
    • 데이터베이스 헬스체크 명령어를 PostgreSQL에 맞게 수정했습니다.
    • LocalStack 서비스에 'init' 볼륨을 추가하고 'DEFAULT_REGION' 환경 변수 설정을 수정했습니다.
    • 애플리케이션 서비스에서 불필요한 API 키 관련 환경 변수들을 제거했습니다.
    • 애플리케이션 서비스의 'depends_on' 대상을 'mysql'에서 'db'로 변경했습니다.
    • 애플리케이션 서비스의 'command'에서 'sleep 8' 부분을 제거했습니다.
  • db/init/001_init.sql
    • MySQL 특정 구문(AUTO_INCREMENT, ENUM, DATETIME, JSON, FLOAT, ENGINE=InnoDB, SET NAMES, SET FOREIGN_KEY_CHECKS)을 PostgreSQL 호환 구문(BIGSERIAL, VARCHAR with CHECK, TIMESTAMP, JSONB, REAL)으로 변환했습니다.
    • UNIQUE KEY 정의를 'CONSTRAINT ... UNIQUE' 형식으로 변경했습니다.
  • src/main/resources/application-docker.yml
    • 데이터소스 드라이버 클래스와 URL을 PostgreSQL에 맞게 업데이트했습니다.
    • JPA Hibernate dialect를 'org.hibernate.dialect.PostgreSQLDialect'로 설정했습니다.
    • AWS S3 및 SQS 엔드포인트 설정을 'spring.cloud.aws' 아래로 재구성하고, AWS_ACCESS_KEY_ID 및 AWS_SECRET_ACCESS_KEY를 추가했습니다.
    • Spring Batch job을 비활성화하는 설정을 추가했습니다.
Activity
  • 현재까지 기록된 활동 (댓글, 리뷰 등)은 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sableye9 sableye9 changed the title [FEAT] Docker 환경 Admin Dashboard 및 DB 설정 정리 [FEAT] Docker 환경 DB 설정 정리 Mar 11, 2026
@sableye9 sableye9 self-assigned this Mar 11, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 Docker 환경 설정과 데이터베이스 마이그레이션에 대한 중요한 변경사항을 포함하고 있습니다. 전반적으로 설정이 깔끔하게 정리되었지만, 두 가지 중요한 점검이 필요합니다. 첫째, PostgreSQL로 마이그레이션하면서 MySQL의 ON UPDATE CURRENT_TIMESTAMP 기능이 누락되어 updated_at 필드가 자동으로 갱신되지 않는 문제가 있습니다. 이를 해결하기 위해 PostgreSQL 트리거를 추가해야 합니다. 둘째, application-docker.yml에서 AWS 설정을 spring-cloud-aws 방식으로 변경했지만, 기존 S3Config와 호환되지 않아 S3 기능이 정상적으로 동작하지 않을 것입니다. 이 부분에 대한 수정이 필요합니다. 자세한 내용은 각 파일에 남긴 코멘트를 참고해주세요.

@sableye9
Copy link
Collaborator Author

application-docker.yml는 잘못 올려서 수정했습니다.

@gudals2040 gudals2040 merged commit 6467d91 into dev Mar 12, 2026
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.

[FEAT] Docker 환경 DB 설정 정리

2 participants