Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
7ea6947
[refactor]
gogeun Mar 27, 2026
2f6b9b9
[refactor]
gogeun Mar 27, 2026
80e86e7
[refactor]
gogeun Mar 27, 2026
d6ca38c
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] Mar 31, 2026
721127d
docs/Update readme.md
sangmin1571 Apr 2, 2026
04df98d
docs/Update readme.md
sangmin1571 Apr 2, 2026
a81f4dd
[docs]
gogeun Apr 3, 2026
75364df
docs/Update readme.md
sangmin1571 Apr 3, 2026
ea9063d
Merge pull request #10 from Veri-Q-Project/refactor/KD-40
gogeun Apr 3, 2026
08ac5c5
server test
gogeun Apr 3, 2026
1bd9aaf
Fix: Update deploy.yml from feat/KD-12
sangmin1571 Apr 3, 2026
2d5cd84
Merge develop into feat/KD-12 and fix deploy.yml conflict
sangmin1571 Apr 3, 2026
736c281
Fix: Add permissions to deploy.yml for SSH authentication
sangmin1571 Apr 3, 2026
19691c4
Fix: Add bootJar and build option to deploy script
sangmin1571 Apr 3, 2026
084b54b
Fix: Final indentation fix for deploy.yml
sangmin1571 Apr 3, 2026
5c540e1
Fix: Setup project directory and database configuration
sangmin1571 Apr 3, 2026
acb1a3f
Fix-Final sync: Docker config and dual profiles
sangmin1571 Apr 3, 2026
2c0f2ef
docs/Update readme.md
sangmin1571 Apr 6, 2026
6e01d9f
docs/Update readme.md
sangmin1571 Apr 7, 2026
4afcd22
fix/server-develop: CI/CD 파이프라인 및 도커 인프라 설정 오류해결
sangmin1571 Apr 7, 2026
d20bad4
feat/KD-15: IP 기반 Rate Limit 및 동시성 제어 로직 적용
sangmin1571 Apr 7, 2026
afcafe9
Merge branch 'develop' of https://github.com/Veri-Q-Project/main-serv…
sangmin1571 Apr 7, 2026
4b304b1
fix/server-develop
sangmin1571 Apr 7, 2026
cad71ab
fix/KD-15 :CodeRabbit 리뷰 반영 (Redis Lua 스크립트 적용 및 X-Forwarded-For 취약점 수정)
sangmin1571 Apr 8, 2026
c804899
feat/KD-16:비 url 결과 및 이미 스캔한 url redis에서 캐싱
sangmin1571 Apr 8, 2026
d19b015
@PrePersist 주석 추가
gogeun Apr 9, 2026
4510862
url을 gcp의 외부 ip로 변경
gogeun Apr 9, 2026
3f27b10
불필요한 주석 수정
gogeun Apr 9, 2026
c368d9d
불필요한 공백 제거
gogeun Apr 9, 2026
91ca61c
프로세스 변경에 따른 분기 로직 수정,
gogeun Apr 9, 2026
80679e0
refactor/feat/KD-16:Redis url 캐시 키 해싱 적용 및 TTL 동기화, 예외 처리 보완
sangmin1571 Apr 9, 2026
f55d1c0
Merge branch 'develop' into feat/KD-60
gogeun Apr 9, 2026
80a30a4
Merge pull request #25 from Veri-Q-Project/feat/KD-60
gogeun Apr 9, 2026
9709a95
fix/develop:Be3_URL 관련 controller 클래스 및 application.yml 수정
sangmin1571 Apr 9, 2026
a3e12d1
be2에게 전송받을 분석 dto 구조 생성
gogeun Apr 9, 2026
773052e
be2에게 전송받을 분석 dto 구조 중에서 enum 타입 riskLevel 생성
gogeun Apr 9, 2026
85134ca
refactor-fix/develop
sangmin1571 Apr 9, 2026
ccad3f5
Merge pull request #27 from Veri-Q-Project/feat/KD-69
gogeun Apr 9, 2026
2700f93
db 테이블에 따라 entity 파일 수정
gogeun Apr 9, 2026
8cfcf38
- entity구조 변경에 따라 build 속성 추가
gogeun Apr 9, 2026
69acb22
- 직관적이지 않은 컬럼명 수정
gogeun Apr 9, 2026
211bb1a
- 매개변수명 같은 형식으로 수정
gogeun Apr 9, 2026
09bdd59
- 필요한 라이브러리 import
gogeun Apr 9, 2026
e994806
- 테스트 중 예외 발생 시 확인용 로그 추가
gogeun Apr 9, 2026
6553bba
refactor-fix/develop
sangmin1571 Apr 9, 2026
e159f63
refactor-fix/develop
sangmin1571 Apr 9, 2026
4bc8530
Merge pull request #26 from Veri-Q-Project/fix/develop
sangmin1571 Apr 9, 2026
1e5596e
fix: MySQL8Dialect를 MySQLDialect로 수정하여 Hibernate 7 대응
sangmin1571 Apr 9, 2026
1324b01
fix: docker-compose.yml수정
sangmin1571 Apr 9, 2026
afe3510
fix: Dockerfile 수정
sangmin1571 Apr 10, 2026
a5ddd43
fix: Dockerfile 수정
sangmin1571 Apr 10, 2026
60e6147
fix: Dockerfile 수정
sangmin1571 Apr 10, 2026
b607d7b
fix: Dockerfile 수정
sangmin1571 Apr 10, 2026
bce48c7
fix: application-be1.yml 수정
sangmin1571 Apr 10, 2026
3f832b2
fix: application-be1.yml 수정
sangmin1571 Apr 10, 2026
8ffc03a
fix: application-be1.yml 수정
sangmin1571 Apr 10, 2026
ac732a7
- application.yml설정 파일 하나로 압축
gogeun Apr 10, 2026
795a578
Merge pull request #28 from Veri-Q-Project/feat/KD-71
gogeun Apr 10, 2026
c3c4b5b
Merge branch 'develop' of https://github.com/Veri-Q-Project/main-serv…
gogeun Apr 10, 2026
f401ccd
fix: deploy.yml 수정
sangmin1571 Apr 10, 2026
05b959a
Merge remote-tracking branch 'origin/develop' into develop
sangmin1571 Apr 10, 2026
979d439
fix: application-be1.yml수정
sangmin1571 Apr 10, 2026
5f8d48c
fix: application-be1.yml수정
sangmin1571 Apr 10, 2026
6a35bb6
fix: application-be1.yml수정
sangmin1571 Apr 10, 2026
e01118c
fix: application-be1.yml수정
sangmin1571 Apr 10, 2026
b16cd24
fix: application-be1.yml수정
sangmin1571 Apr 10, 2026
e60c666
test:be1->be3 이미지 전송
sangmin1571 Apr 10, 2026
ebdf75e
test:be1->be3 이미지 전송
sangmin1571 Apr 10, 2026
01cdd1b
test:be1->be3 이미지 전송
sangmin1571 Apr 11, 2026
2afbe19
충돌 해결을 위한 커밋
gogeun Apr 11, 2026
84f54fc
Merge branch 'develop' into feat/KD-15
sangmin1571 Apr 11, 2026
85b9b4e
Merge pull request #20 from Veri-Q-Project/feat/KD-15
sangmin1571 Apr 11, 2026
7b1b8e3
refactor-feat/kd-15: 클라이언트 ip 추출 메소드 변경
sangmin1571 Apr 11, 2026
44987dd
Merge remote-tracking branch 'origin/develop' into feat/KD-16
sangmin1571 Apr 11, 2026
be75296
refactor-feat/kd-16: db에 저장되 있는 기존 url 상세 보고서 내역 redis로 연동로직 추가 및 프론트…
sangmin1571 Apr 11, 2026
71e6adb
refactor-feat/kd-16: Redis 캐싱 도입 및 비동기 분석 콜백 구조 구현
sangmin1571 Apr 11, 2026
ea52fdc
refactor-feat/kd-16: MSA 인프라 보안 설정 및 캐시 로직 최적화
sangmin1571 Apr 12, 2026
fc876fe
refactor-feat/kd-16: 프론트엔드 통신 규약 준수를 위한 응답 DTO 매핑 및 로직 최적화
sangmin1571 Apr 14, 2026
b75df3f
refactor-feat/kd-16: QR 스캔 파이프라인 최적화 및 보안 강화
sangmin1571 Apr 15, 2026
7de4ff9
refactor-feat/kd-16: QR 스캔 파이프라인 최적화 및 보안 강화
sangmin1571 Apr 15, 2026
9ce860a
refactor-feat/kd-16: 서버 안정성 강화 및 비동기 실행자 설정 최적화
sangmin1571 Apr 15, 2026
d4f2294
refactor-feat/kd-16: 예외 처리 계층화 및 DB 인덱스 최적화
sangmin1571 Apr 15, 2026
3735a5d
refactor-feat/kd-16: 콜백 멱등성 보장 및 예외 전파 로직 최적화
sangmin1571 Apr 15, 2026
3975850
fix-feat/kd-16: 콜백 멱등성 키 충돌 방지 및 예외 처리 Null-Safe 보강
sangmin1571 Apr 16, 2026
6d9a20d
fix-feat/kd-16: 콜백 멱등성 키 충돌 방지 및 예외 처리 Null-Safe 보강
sangmin1571 Apr 16, 2026
f5bd50e
Merge pull request #22 from Veri-Q-Project/feat/KD-16
sangmin1571 Apr 16, 2026
e154f6f
fix-feat/kd-16: be3쪽 redisconfig추가
sangmin1571 Apr 16, 2026
c0d4d0f
fix-feat/kd-16: 비 url be1,be3 dto 불일치로 통신오류
sangmin1571 Apr 16, 2026
be2cd10
fix-develop:분석서버 전송시 url불일치 오류 해결
sangmin1571 Apr 17, 2026
4c7fc99
fix-develop:분석서버 전달시 guestUuid body에 전송x
sangmin1571 Apr 17, 2026
93ac922
fix-develop:docker-compse.yml env callbackurl 추가
sangmin1571 Apr 17, 2026
6024617
fix-develop:스캔반응 dto 변수 수정
sangmin1571 Apr 17, 2026
ddc3f9a
fix-develop:processRequest 설정 수정
sangmin1571 Apr 17, 2026
2cd71e5
fix-develop:sse progress관련 로그 설정
sangmin1571 Apr 17, 2026
db31e30
fix-develop:시크릿키 경로 수정
sangmin1571 Apr 17, 2026
17bb2fa
fix-develop:함수추가
sangmin1571 Apr 17, 2026
5c96f9c
fix-develop:환경변수 설정 및 시간 dto 수정
sangmin1571 Apr 18, 2026
924af97
fix-develop:최종-sse한글 꺠짐 및 스웨거 연동
sangmin1571 Apr 18, 2026
ac8fcf0
fix-develop:스웨거 연동 빌드 수정
sangmin1571 Apr 18, 2026
e7c8837
fix-develop:스웨거 연동 object 미표시 수정
sangmin1571 Apr 20, 2026
2bce1da
feat/kd-18: db및 캐시의 기존 분석 url risklevel에 따른 분석 재요청 기능 구현
sangmin1571 Apr 23, 2026
3605964
충돌 해결을 위한 커밋
gogeun Apr 24, 2026
8be53a7
feat/kd-18: db및 캐시의 기존 분석 url risklevel에 따른 분석 재요청 기능 구현
sangmin1571 Apr 24, 2026
cc5af6b
feat/kd-18: db및 캐시의 기존 분석 url risklevel에 따른 분석 재요청 기능 구현1
sangmin1571 Apr 24, 2026
0dbd3b5
feat/kd-18: db및 캐시의 기존 분석 url risklevel에 따른 분석 재요청 기능 구현2
sangmin1571 Apr 24, 2026
727ff14
feat/kd-18: db및 캐시의 기존 분석 url risklevel에 따른 분석 재요청 기능 구현3
sangmin1571 Apr 24, 2026
21e7634
kd-18 작업 내용 임시 저장
sangmin1571 Apr 26, 2026
fd497b6
Merge branch 'develop' into feat/KD-18
sangmin1571 Apr 26, 2026
e4cc6af
fix-feat/kd-18 버그 수정
sangmin1571 Apr 26, 2026
41fce49
fix-feat/kd-18 버그 수정2
sangmin1571 Apr 26, 2026
64eccf1
Merge pull request #30 from Veri-Q-Project/feat/KD-18
sangmin1571 Apr 26, 2026
a4edf4a
fix-develop: ml종류 스웨거 연동 및 스캔내역 초기화 오류 해결
sangmin1571 Apr 26, 2026
f0d5b06
Merge remote-tracking branch 'origin/develop' into develop
sangmin1571 Apr 26, 2026
df8df92
fix-develop: url변수 오류 수정
sangmin1571 Apr 26, 2026
17564d0
fix-develop: url변수 오류 수정2
sangmin1571 Apr 26, 2026
907543a
fix-develop: url변수 오류 수정3
sangmin1571 Apr 26, 2026
706e6db
fix-develop: url변수 오류 수정4
sangmin1571 Apr 26, 2026
9c31a7e
fix-develop: url변수 오류 수정5
sangmin1571 Apr 26, 2026
325329c
fix-develop: url변수 오류 수정6
sangmin1571 Apr 26, 2026
87a9f45
fix-develop: 시간 불일치 문제 해결
sangmin1571 Apr 26, 2026
20a79ce
fix-스웨거 반영
sangmin1571 Apr 28, 2026
eb0d9cc
fix-스웨거 반영2
sangmin1571 Apr 28, 2026
c3999b5
fix-스웨거 반영3
sangmin1571 Apr 28, 2026
b161c00
fix-스웨거 반영4
sangmin1571 Apr 28, 2026
af50c3a
fix-스웨거 반영5
sangmin1571 Apr 28, 2026
542d92d
fix-스웨거 반영6
sangmin1571 Apr 28, 2026
3fec21d
fix-스웨거 반영7
sangmin1571 Apr 28, 2026
b5b48d8
fix-스웨거 반영8
sangmin1571 Apr 28, 2026
443ed5c
fix-스웨거 반영9
sangmin1571 Apr 28, 2026
19459e5
fix-스웨거 반영10
sangmin1571 Apr 28, 2026
b622258
fix-분석서버쪽 dto수정
sangmin1571 Apr 29, 2026
277dd50
fix-분석서버쪽 dto수정2
sangmin1571 Apr 29, 2026
60a9b93
fix-분석서버쪽 dto수정3
sangmin1571 Apr 29, 2026
6e4f512
fix-분석서버쪽 dto수정4
sangmin1571 Apr 29, 2026
6129463
fix-분석서버쪽 dto수정4
sangmin1571 Apr 29, 2026
cd331af
fix-분석서버쪽 dto수정4
sangmin1571 Apr 29, 2026
bad5668
fix-분석서버쪽 dto수정4
sangmin1571 Apr 29, 2026
0d5dcf1
충돌 해결을 위한 커밋
gogeun Apr 30, 2026
0bf9078
fix-분석서버쪽 dto수정4
sangmin1571 May 3, 2026
b9a0af5
fix-분석서버쪽 dto수정4
sangmin1571 May 3, 2026
f3a9154
fix-분석서버쪽 dto수정4
sangmin1571 May 3, 2026
064ca7b
fix-분석서버쪽 dto수정5
sangmin1571 May 4, 2026
c98755e
fix-분석서버쪽 dto수정6(캡차횟수 증가)
sangmin1571 May 4, 2026
509b70a
fix- 캡차수정(캡차 페이지 구현 X 해결)
sangmin1571 May 7, 2026
24b7d07
fix- 캡차수정(캡차 페이지 구현 X 해결)
sangmin1571 May 7, 2026
1f4c156
Merge remote-tracking branch 'origin/develop' into develop
sangmin1571 May 7, 2026
4678424
fix- 캡차수정(50)
sangmin1571 May 8, 2026
d7ca9d2
Merge branch 'develop' of https://github.com/Veri-Q-Project/main-serv…
gogeun May 8, 2026
329dbf7
fix- finalurl(오류)수정
sangmin1571 May 8, 2026
76341b3
fix- finalurl(오류)수정2
sangmin1571 May 9, 2026
f35897c
fix- finalurl(오류)수정3
sangmin1571 May 9, 2026
fd6d703
fix- swagger threats변경
sangmin1571 May 12, 2026
8b12781
fix- swagger threats변경2
sangmin1571 May 12, 2026
23a3e97
Merge branch 'develop' of https://github.com/Veri-Q-Project/main-serv…
gogeun May 19, 2026
51c318a
fix- swagger threats변경3
sangmin1571 May 22, 2026
7b0a996
Merge branch 'develop' of https://github.com/Veri-Q-Project/main-serv…
gogeun May 22, 2026
bde301d
프론트 요구사항에 따라 /text request를 기존 post방식에서 get방식으로 변경
gogeun May 22, 2026
0323d96
1. 단축 url 뒤에 포트 번호 쓰는 경우도 탐지하도록 보완
gogeun May 29, 2026
fb5067b
Merge pull request #31 from Veri-Q-Project/feat/KD-83
gogeun May 29, 2026
a0623be
fix-final3
sangmin1571 May 29, 2026
361d22a
fix-threat라벨 추가
sangmin1571 Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MYSQL_ROOT_PASSWORD=veriq123
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Veri-Q Develop Deploy

on:
push:
branches: [ "develop", "feat/KD-12" ]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: SSH Remote Commands
uses: appleboy/ssh-action@master
Comment on lines +14 to +15

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

What is the latest stable version of appleboy/ssh-action GitHub Action?

💡 Result:

The latest stable version of appleboy/ssh-action is v1.2.5, released on 2026-01-28.

Citations:


보안: GitHub Action 버전을 고정하세요.

appleboy/ssh-action@master 대신 특정 버전 태그를 사용하세요. @master는 예고 없이 변경될 수 있어 보안 위험이 있습니다.

🔒 버전 고정 제안
       - name: SSH Remote Commands
-        uses: appleboy/ssh-action@master
+        uses: appleboy/ssh-action@v1.2.5
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy.yml around lines 14 - 15, Replace the floating ref
uses: appleboy/ssh-action@master with a pinned release tag to avoid unexpected
upstream changes; update the uses line (appleboy/ssh-action@master) to use a
concrete version tag (for example appleboy/ssh-action@vX.Y.Z) by choosing the
latest stable release from the action’s releases and commit that exact tag in
the workflow.

with:
host: ${{ secrets.GCP_IP }}
username: ${{ secrets.GCP_USER }}
key: ${{ secrets.GCP_SSH_KEY }}
command_timeout: 50m
script: |
cd /opt/main-server
git pull origin develop
chmod +x gradlew
sudo ./gradlew bootJar
sudo docker-compose build --no-cache
sudo docker-compose up --build -d

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ out/
.gradle/
# 비밀번호가 담긴 설정 파일은 제외
src/main/resources/application.yml
.env
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 1단계: 빌드 스테이지
FROM gradle:jdk21 AS build
WORKDIR /app
COPY . .

# 빌드 인자로 메인 클래스를 받습니다 (기본값은 Gateway)
ARG MAIN_CLASS=com.veriq.veriqgateway.VeriQGatewayApplication

# 지정된 메인 클래스로 빌드하도록 명령
RUN gradle clean build -x test -PmainClass=${MAIN_CLASS}

# 2단계: 실행 스테이지
FROM eclipse-temurin:21-jdk
RUN groupadd -r appgroup && useradd -r -g appgroup appuser
WORKDIR /app

# 빌드된 jar 파일 가져오기
COPY --from=build /app/build/libs/*.jar /app/app.jar

RUN chown -R appuser:appgroup /app
USER appuser
ENTRYPOINT ["java", "-jar", "/app/app.jar"]
302 changes: 301 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,301 @@
add file ".gitignore"
# Veri-Q 서버 접속 및 개발 가이드
구축한 GCP 서버 인프라를 사용하기 위한 가이드입니다.

## 🌐 서버 정보
- **공통 외부 IP**: `34.64.218.236`
- **관리자 계정**: `root` (DB 접속 시 사용)
* **서버 사용자**: `sk38808738` (SSH 접속 시 사용)
Comment on lines +5 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

보안: 민감한 정보가 문서에 노출되어 있습니다.

README에 실제 서버 IP 주소(34.64.218.236)와 비밀번호(veriq123)가 포함되어 있습니다. 이 정보는 공개 저장소에 커밋하면 안 됩니다.

🔒 플레이스홀더 사용 제안
 ## 🌐 서버 정보
-- **공통 외부 IP**: `34.64.218.236`
+- **공통 외부 IP**: `<GCP_EXTERNAL_IP>`  # 팀 채널에서 확인
 - **관리자 계정**: `root` (DB 접속 시 사용)
-* **서버 사용자**: `sk38808738` (SSH 접속 시 사용)
+* **서버 사용자**: `<SSH_USERNAME>` (SSH 접속 시 사용)

비밀번호도 [비밀번호] 형태의 플레이스홀더로 일관되게 변경하세요.

Also applies to: 132-133

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 5 - 7, Replace the hardcoded sensitive values in
README.md: remove the real IP "34.64.218.236" and password "veriq123" and
replace them with clear placeholders (e.g., "[공통 외부 IP]" or "[IP 주소]", "[비밀번호]")
in the lines under the "**공통 외부 IP**", "**관리자 계정**" and the server user entry
(currently showing "sk38808738"); also update the other occurrences noted (lines
referenced 132-133) to use the same placeholders and commit the change so no
real credentials remain in the repo.


### 서비스별 포트
| 서비스 | 포트 | 용도 |
| :--- | :--- | :--- |
| **Spring BE1** | `8081` | Gateway 서버 |
| **Spring BE3** | `8083` | Platform/Data Hub 서버 |
| **FastAPI** | `8000` | 분석 엔진 서버 |
| **MySQL** | `3306` | 데이터베이스 |
| **Redis** | `6379` | 캐시 서버 |
Comment on lines +10 to +16

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Markdownlint(MD058): 표 전후 공백 줄을 추가하세요.

Line 10의 표는 앞/뒤에 빈 줄이 필요합니다. 렌더링 일관성과 lint 통과를 위해 blank line을 넣어 주세요.

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 10-10: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 10 - 16, The markdown table starting with "| 서비스 | 포트
| 용도 |" needs blank lines immediately before and after it to satisfy
Markdownlint MD058; edit README.md and insert a single empty line above the
table header and a single empty line after the final table row so the table is
separated from surrounding content.


---
## 🛠️ 팀원별 환경 설정 가이드 (로컬 개발용)

> **공통 외부 IP**: `34.64.218.236`
> 모든 팀원은 로컬에서 테스트할 때 아래 설정값을 참조하여 접속 정보를 수정해 주세요.
>
> > 🚨 **중요: 보안을 위해 DB 비밀번호가 코드에서 제거되었습니다.**
> 프로젝트를 처음 클론받거나 Pull 한 후, 반드시 프로젝트 최상단(루트) 경로에 **`.env`** 파일을 생성해 주세요.

### 1️⃣ `.env` 파일 생성 (필수)
프로젝트 루트에 `.env` 파일을 만들고 아래 내용을 입력합니다. (비밀번호는 카톡방 공지 확인)
```text
MYSQL_ROOT_PASSWORD=여기에_공유된_비밀번호

```

### **.🍃 Spring Boot
`src/main/resources/application-be1.yml` 아래와 같이 수정합니다.
Comment on lines +34 to +35

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

헤더 강조 마크다운 문법이 깨져 렌더링이 불안정합니다.

### **... 형태로 닫히지 않은 강조 마커가 여러 군데 있어 제목 렌더링/린트 문제가 발생할 수 있습니다.

수정 예시
-### **.🍃 Spring Boot
+### 🍃 Spring Boot

-### **⚡FastAPI
+### ⚡ FastAPI

-### **📦 인프라 및 배포 설정 파일 안내(Dockerfile)
+### 📦 인프라 및 배포 설정 파일 안내 (Dockerfile)

Also applies to: 103-104, 121-121, 125-125, 145-145

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 34 - 35, Several README headings (for example the
line starting "### **.🍃 Spring Boot") contain unmatched emphasis markers
causing render/lint issues; fix each heading (including the other occurrences
noted) by either removing the stray asterisks or properly closing the bold
markers so they become valid Markdown (e.g., change "### **.🍃 Spring Boot" to
"### .🍃 Spring Boot" or "### **.🍃 Spring Boot**"), and scan other headings
with similar patterns to ensure no unmatched '*' remain.

```yaml

server:
port: 8081

spring:
datasource:
url: jdbc:mysql://veriq-db:3306/veriq_db?serverTimezone=Asia/Seoul&characterEncoding=UTF-8
username: root
password: ${MYSQL_ROOT_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver
# DB 연결을 최대 30초까지 기다려주는 인내심 설정
hikari:
connection-timeout: 30000

jpa:
hibernate:
ddl-auto: update
show-sql: true
properties:
hibernate:
format_sql: true
# MySQL 8.0 버전에 맞게 Dialect를 조금 더 구체적으로 지정
dialect: org.hibernate.dialect.MySQL8Dialect

data:
redis:
host: veriq-redis
port: 6379


be3:
api:
url: "http://localhost:8083/api/v1/scan/upload"
```
`src/main/resources/application-be3.yml` 아래와 같이 수정합니다.
```yaml
server:
port: 8083

spring:
datasource:
url: jdbc:mysql://veriq-db:3306/veriq_db?serverTimezone=Asia/Seoul&characterEncoding=UTF-8
username: root
password: ${MYSQL_ROOT_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver
# DB 연결을 최대 30초까지 기다려주는 인내심 설정
hikari:
connection-timeout: 30000

jpa:
hibernate:
ddl-auto: update
show-sql: true
properties:
hibernate:
format_sql: true
# MySQL 8.0 버전에 맞게 Dialect를 조금 더 구체적으로 지정
dialect: org.hibernate.dialect.MySQL8Dialect

data:
redis:
host: veriq-redis
port: 6379

```

### **⚡FastAPI
--env파일을 다음과 같이 수정합니다
```yaml
# Database 연결 정보
DB_URL = "mysql+pymysql://root:[비밀번호]@34.64.218.236:3306/veriq_db"

# Redis 연결 정보
REDIS_HOST = "34.64.218.236"
REDIS_PORT = 6379

```







### **📦 인프라 및 배포 설정 파일 안내(Dockerfile)



### **🍃 Spring Boot Dockerfile

```yaml
FROM eclipse-temurin:21-jdk

# 애플리케이션 전용 비루트 사용자 생성
RUN groupadd -r appgroup && useradd -r -g appgroup appuser
WORKDIR /app

# JAR 파일 복사 및 권한 부여
ARG JAR_FILE=build/libs/*.jar
COPY --chown=appuser:appgroup ${JAR_FILE} /app/app.jar

# 사용자 전환 및 실행
USER appuser
ENTRYPOINT ["java", "-jar", "/app/app.jar"]
```



### **⚡FastAPI Dockerfile
```yaml
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]

```
### **🐳 docker-compose.yml(공통) (최상위 경로)
```yaml
services:
# 1. MySQL 데이터베이스
veriq-db:
image: mysql:8.0
container_name: veriq-db
restart: always
ports:
- "127.0.0.1:3306:3306" # 외부 IP 접속 차단, 로컬 호스트만 허용
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: veriq_db
volumes:
- ./mysql_data:/var/lib/mysql

# 2. Redis 캐시 서버
veriq-redis:
image: redis:latest
container_name: veriq-redis
restart: always
ports:
- "127.0.0.1:6379:6379"

# 3. Spring BE1 (Gateway)
veriq-gateway:
build:
context: .
dockerfile: Dockerfile
container_name: veriq-be1
restart: always
ports:
- "8081:8081"
environment:
SPRING_PROFILES_ACTIVE: be1
BE3_API_URL: "http://veriq-platform:8083/api/v1/scan/upload" # 도커 내부망 주소로 덮어쓰기
depends_on:
- veriq-db
- veriq-redis

# 4. Spring BE3 (Platform/Data Hub)
veriq-platform:
build:
context: .
dockerfile: Dockerfile
container_name: veriq-be3
restart: always
ports:
- "8083:8083"
environment:
SPRING_PROFILES_ACTIVE: be3
depends_on:
- veriq-db
- veriq-redis

# 5. FastAPI (분석 엔진)
veriq-analysis:
build:
context: ../analysis-engine
dockerfile: Dockerfile
container_name: veriq-analysis
restart: always
ports:
- "8000:8000"
depends_on:
- veriq-db

```










### **GitHub Actions 자동 배포(🍃 Spring Boot) (.github/workflows/deploy.yml)
develop 브랜치에 코드가 푸시되면 자동으로 GCP 서버에 배포됩니다.

```yaml
name: Veri-Q Develop Deploy

on:
push:
branches: [ "develop" ]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: SSH Remote Commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.GCP_IP }}
username: ${{ secrets.GCP_USER }}
key: ${{ secrets.GCP_SSH_KEY }}
script: |
cd /home/sk38808738/main-server
git pull origin develop
chmod +x gradlew
sudo ./gradlew bootJar

# GitHub Secrets에서 안전하게 비밀번호를 가져와 서버에 .env 파일 즉석 생성
echo "MYSQL_ROOT_PASSWORD=${{ secrets.MYSQL_ROOT_PASSWORD }}" > .env

# 컨테이너 빌드 및 재실행
sudo docker-compose up --build -d
```
### **GitHub Actions 자동 배포(⚡FastAPI) (.github/workflows/deploy.yml)
develop 브랜치에 코드가 푸시되면 자동으로 GCP 서버에 배포됩니다.

```yaml
name: FastAPI Auto Deploy

on:
push:
branches: [ "develop" ]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: SSH Remote Commands for FastAPI
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.GCP_IP }}
username: ${{ secrets.GCP_USER }}
key: ${{ secrets.GCP_SSH_KEY }}
script: |
# 1. FastAPI 폴더로 이동해서 최신 코드 pull
cd /home/sk38808738/analysis-engine
git pull origin develop
# 2. 도커 설계도가 있는 메인 서버 폴더로 이동
cd /home/sk38808738/main-server
sudo docker-compose up --build -d veriq-analysis



```



21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,29 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test'
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.9'
}

tasks.named('test') {
useJUnitPlatform()
}
jar {
enabled = false
}

// 외부에서 전달된 mainClass 파라미터가 있으면 그걸 사용하고, 없으면 기본값 사용
def selectedMainClass = project.hasProperty('mainClass') ? project.getProperty('mainClass') : 'com.veriq.veriqgateway.VeriQGatewayApplication'

// 2. Spring Boot가 실행 가능한 jar를 만들 때 이 클래스를 메인으로 사용하도록 설정
bootJar {
mainClass = selectedMainClass
}

// 3. (중요) Gradle 자체의 메인 클래스 설정도 동기화해줍니다.
springBoot {
mainClass = selectedMainClass
}
Loading