-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] Member, Challenger 도메인 기초 엔티티 기초 설계 & OAuth 기초 생성 #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
2c3c481
refactor: Swagger Tag용 Enum 생성 및 OpenApiConfig 수정
kyeoungwoon 104f095
feat: member 도메인 port 설계
kyeoungwoon b4788a1
chore: 임시 dockerfile 추가 및 OAuth를 위한 dependency 추가, 로그 설정 변경
kyeoungwoon a272fa0
feat: OAuth 관련 설정 및 코드 스타일 포맷팅 적용, Member 도메인명 변경 적용
kyeoungwoon a2bb6e8
refactor: Member 도메인의 command를 통합하였습니다.
kyeoungwoon 0c6969f
feat: Member 도메인 구현체 제작 (WIP)
kyeoungwoon 23d9d9c
feat: Member 도메인 Entity
kyeoungwoon d8fd105
chore: 테스트용 컨트롤러 부분 SwaggerTag 적용 및 포맷팅
kyeoungwoon f5b8c0b
feat: Challenger 도메인 Entity 제작
kyeoungwoon 68e99a3
feat: Challenger 도메인 Entity 및 Port 설계
kyeoungwoon fcdad03
feat: Challenger-ChallengerPoint 엔티티 연관관계 명시
kyeoungwoon 852aeca
merge: develop 브랜치 동기화
kyeoungwoon 58af856
rename: User를 사용하고 있는 곳에서 Member를 사용하도록 변경
kyeoungwoon 9687184
fix: ENUM에 Enumerated 어노테이션 붙이지 않은 부분 수정 및 단복수 수정
kyeoungwoon 48306a9
fix: 불필요한 매개변수를 받던 record 수정
kyeoungwoon 6f8c4f0
fix: 콘솔이 아닌 파일에도 traceId를 줄여서 기록하던 문제 해결
kyeoungwoon ffe09fc
feat: Public 어노테이션 구현 변경 (#37)
kyeoungwoon 8b19567
fix: member 엔티티에 닉네임과 이메일이 unique로 설정되어 있는 문제 해결
kyeoungwoon f74e1e8
feat: Entity에 enum 및 length 설정
kyeoungwoon e13e780
chore: 컨벤션에 어긋난 코드 수정
kyeoungwoon 5f9eef3
feat: docker compose 실행 환경 지정 및 실패하는 테스트 제거
kyeoungwoon 73902d0
chore: 사용하지 않는 script 제거
kyeoungwoon d6ce448
merge: #32에서 작업한 Challenger 도메인 작업본 병합
kyeoungwoon 24c9387
merge: update with develop
kyeoungwoon 2f2a413
docs: RBAC 관련 Claude 작성 가이드
kyeoungwoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # ================================= | ||
| # Build stage | ||
| # ================================= | ||
| FROM gradle:8.5-jdk21 AS build | ||
| WORKDIR /app | ||
|
|
||
| # Copy Gradle wrapper and build files first to leverage cache | ||
| # gradle.properties는 나중에 다시 설정하면 추가하기 | ||
| COPY build.gradle settings.gradle gradlew ./ | ||
| COPY gradle ./gradle | ||
| RUN chmod +x gradlew && ./gradlew dependencies --no-daemon | ||
|
|
||
| # Copy source and build artifact | ||
| COPY src ./src | ||
| # Skip tests in build to speed up image build (optional) | ||
| RUN ./gradlew bootJar --no-daemon -x test && mv build/libs/*.jar app.jar | ||
|
|
||
| # ================================= | ||
| # Run stage | ||
| # ================================= | ||
| FROM eclipse-temurin:21-jre-jammy | ||
| WORKDIR /app | ||
|
|
||
| LABEL maintainer="kyeoungwoon" \ | ||
| version="1.0" | ||
|
|
||
| # Create non-root user before copying files so --chown works | ||
| RUN groupadd -r spring && useradd -r -g spring spring | ||
|
|
||
| # Copy jar from build stage and set ownership to non-root user | ||
| COPY --from=build --chown=spring:spring /app/app.jar ./app.jar | ||
| RUN chmod 444 app.jar | ||
|
|
||
| # 로그 디렉토리 생성 및 권한 설정 추가 | ||
| RUN mkdir -p /app/logs && chown -R spring:spring /app/logs | ||
|
|
||
| # Switch to non-root user | ||
| USER spring:spring | ||
|
|
||
| # Expose application port | ||
| EXPOSE 8080 | ||
|
|
||
| # JVM options (single line to avoid parsing issues) | ||
| ENV JAVA_OPTS="-XX:+UseContainerSupport \ | ||
| -XX:MaxRAMPercentage=75.0 \ | ||
| -XX:+UseG1GC \ | ||
| -XX:+ExitOnOutOfMemoryError \ | ||
| -XX:+HeapDumpOnOutOfMemoryError \ | ||
| -XX:HeapDumpPath=/tmp/heapdump.hprof \ | ||
| -Duser.timezone=Asia/Seoul \ | ||
| -Djava.security.egd=file:/dev/./urandom" | ||
|
|
||
| # Use exec form with sh -c so JAVA_OPTS is expanded and signals forwarded | ||
| ENTRYPOINT ["sh", "-c", "exec java $JAVA_OPTS -jar app.jar"] | ||
|
|
||
| # Optional healthcheck (uncomment if actuator/health endpoint exists) | ||
| # HEALTHCHECK --interval=30s --timeout=5s CMD curl -f http://localhost:8080/actuator/health || exit 1 | ||
kyeoungwoon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
ENTRYPOINTusessh -cwithexec java $JAVA_OPTS -jar app.jar, which allows command injection if any external or untrusted configuration can influenceJAVA_OPTS, because shell metacharacters like command substitution ($(), backticks) will be evaluated beforejavais executed. This can give an attacker arbitrary command execution inside the container at startup. To mitigate this, use an exec-form entrypoint that invokesjavadirectly and passesJAVA_OPTSas separate arguments without going through a shell, or otherwise ensureJAVA_OPTScannot be set from untrusted input.