Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

dib-backend

Spring Boot 기반 DIB 백엔드 애플리케이션입니다.

로컬 개발 요구사항

  • JDK 25
  • Docker Engine 또는 Docker Desktop
  • Docker Compose

Java 버전은 다음 명령으로 확인합니다.

java -version

환경 변수 준비

저장소 루트에서 예시 파일을 .env로 복사합니다.

PowerShell:

Copy-Item .env.example .env

macOS 또는 Linux:

cp .env.example .env

.env에는 로컬 포트와 개발용 외부 서비스 설정만 둡니다. 실제 운영 비밀값은 입력하거나 커밋하지 않습니다.

비밀번호 재설정 메일을 실제로 보내려면 DIB_MAIL_MODE=smtp, SMTP_USERNAME, SMTP_APP_PASSWORD, PASSWORD_RESET_PAGE_URL을 설정합니다. Gmail 앱 비밀번호는 공백 없이 환경 변수로 전달하고, 링크 URL은 Android 앱에 등록한 HTTPS App Link의 /password/reset 경로로 지정합니다. SMTP를 켜지 않은 로컬 실행은 메일을 보내지 않으며 재설정 링크나 토큰을 로그에 출력하지 않습니다. 배포 프로필은 SMTP 설정이 필수입니다.

로컬 인프라 실행

PostgreSQL, Redis와 Kafka를 실행합니다.

docker compose up -d
docker compose ps

컨테이너를 종료하면서 데이터를 유지하려면 다음 명령을 사용합니다.

docker compose down

볼륨까지 초기화하면 로컬 데이터가 삭제됩니다. 필요한 데이터가 없는지 확인한 후 실행합니다.

docker compose down -v

로컬 프로필에서는 애플리케이션 시작 시 Flyway가 스키마와 개발용 시드 데이터를 반영합니다.

애플리케이션 실행

기본 프로필은 local이며 서버 포트는 8080입니다.

Windows:

.\gradlew.bat bootRun

macOS 또는 Linux:

./gradlew bootRun

실행 후 다음 경로에서 상태와 API 문서를 확인할 수 있습니다.

  • Health: http://localhost:8080/actuator/health
  • Swagger UI: http://localhost:8080/swagger-ui.html
  • OpenAPI JSON: http://localhost:8080/v3/api-docs

테스트

일부 통합 테스트는 Testcontainers를 사용하므로 Docker가 실행 중이어야 합니다.

Windows:

.\gradlew.bat test

macOS 또는 Linux:

./gradlew test

테스트 결과는 build/reports/tests/test/index.html에서 확인합니다.

프로젝트 문서

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages