Skip to content
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

v1.1.0 #139

Merged
merged 111 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
0bc7b58
[#39] env: μŠ€ν”„λ§ 초기 ν”„λ‘œμ νŠΈ 생성
rdd9223 Oct 15, 2023
25d1709
[#39] env: μŠ€ν”„λ§ μ΅œμ‹ λ²„μ „μœΌλ‘œ 라이브러리 μ—…λ°μ΄νŠΈ
rdd9223 Oct 21, 2023
452da7b
[#39] docs: μŠ€ν”„λ§ swagger 라이브러리 적용
rdd9223 Oct 21, 2023
f853d46
[#39] Spring-ν—¬μŠ€μ²΄ν¬ API κ΅¬ν˜„
rdd9223 Nov 4, 2023
30cce76
[#39] Spring-Dockerfile μ„€μ •
rdd9223 Nov 6, 2023
e80cd13
[#39] Nestjs - 라이브러리 쒅속 ν™˜κ²½ λ³€κ²½ 및 μ—…λ°μ΄νŠΈ
rdd9223 Nov 11, 2023
d0d3a1e
[#39] Spring - Nestjs health check response λ³€κ²½
rdd9223 Nov 11, 2023
6429440
[#39] Docker compose 파일 생성
rdd9223 Nov 11, 2023
aac163c
[#86] spring μ„œλ²„ ν™˜κ²½ μ„ΈνŒ…
yeseul106 Nov 28, 2023
4ed4766
[#86] DTO 및 컨트둀러 클래슀 μƒμ„±μž μ „λž΅ λ¦¬νŒ©ν† λ§
yeseul106 Nov 28, 2023
8553351
[#86] spring data jpa κ΄€λ ¨ μ˜μ‘΄μ„± μΆ”κ°€
yeseul106 Dec 1, 2023
c8f11ea
[#86] Http Status code에 λ”°λ₯Έ μ˜ˆμ™Έ 처리 μΆ”κ°€
yeseul106 Dec 1, 2023
da96bcc
[#86] 곡톡 response 객체 μΆ”κ°€
yeseul106 Dec 1, 2023
e87f877
[#86] JpaAuditing κ΄€λ ¨ config 파일 μΆ”κ°€
yeseul106 Dec 1, 2023
25f5c18
[#86] ν˜„μž¬ DB 컬렴λͺ…에 맞게 PhysicalNamingStrategyStandardImpl둜 물리적 λͺ…λͺ… μ „λž΅ λ°”κΎΈκΈ°
yeseul106 Dec 1, 2023
9be75f6
[#86] κΈ°μ‘΄ nest.jsλ₯Ό κΈ°μ€€μœΌλ‘œ μ—”ν‹°ν‹° λ§ˆμ΄κ·Έλ ˆμ΄μ…˜
yeseul106 Dec 1, 2023
e285d2d
[#86] λŒ€λž΅μ μΈ apiResponse 객체 ꡬ쑰 μˆ˜μ •
yeseul106 Dec 1, 2023
e6765fa
[#86] λΆˆν•„μš”ν•œ μ—”ν„° 곡백 제거
yeseul106 Dec 1, 2023
2e6ecc0
[#88] env: [Spring] νŒ¨ν‚€μ§€κ°„ import 문제 ν•΄κ²°
rdd9223 Dec 2, 2023
f3ccebd
add: pull request template μΆ”κ°€
yeseul106 Dec 2, 2023
3929450
add: bug issue template μΆ”κ°€
yeseul106 Dec 2, 2023
c8542ad
add: feature issue template μΆ”κ°€
yeseul106 Dec 2, 2023
7d57c76
[#91] feat: [λͺ¨μž„] 전체 λͺ¨μž„μ˜ κ²Œμ‹œκΈ€μ„ μ‘°νšŒν•˜λ„λ‘ λ³€κ²½ 및 λͺ¨μž„ 정보도 ν•¨κ»˜ μΆ”κ°€
rdd9223 Dec 2, 2023
2d13548
[#89] chore: λΆˆν•„μš”ν•œ importλ¬Έ μ‚­μ œ
yeseul106 Dec 2, 2023
e6ea2f7
[#89] config: hibernate-types μ‚¬μš©μ„ μœ„ν•΄ μ˜μ‘΄μ„± μΆ”κ°€
yeseul106 Dec 4, 2023
2124b14
[#89] fix: hibernate 6에 λ§žμΆ°μ„œ PhysicalNamingStrategyStandardImpl 넀이밍 μ „λž΅β€¦
yeseul106 Dec 4, 2023
a3e5d19
[#89] rename: 곡톡 응닡 λͺ¨λΈ 클래슀λͺ… μˆ˜μ •
yeseul106 Dec 4, 2023
627e74a
[#89] feat: λ‚΄κ°€ μ†ν•œ λͺ¨μž„ 리슀트 쑰회 api κ΅¬ν˜„
yeseul106 Dec 4, 2023
24593af
[#89] add: Spring Security μ„ΈνŒ…
yeseul106 Dec 5, 2023
e7156ce
[#89] add: Swagger κ΄€λ ¨ config μΆ”κ°€
yeseul106 Dec 5, 2023
47f5577
[#89] fix: securityλ₯Ό λΆ™μž„μ— 따라 jwt 토큰 μœ μ €μ˜ 데이터λ₯Ό 내렀주도둝 μˆ˜μ •
yeseul106 Dec 5, 2023
7f293a5
[#89] fix: λΆˆν•„μš”ν•œ μ½”λ“œ 제거 및 jwt κ΄€λ ¨ μ„ΈνŒ… 정리
yeseul106 Dec 6, 2023
0166fe4
[#96] fix: λͺ¨μž„ 이미지 ν•„λ“œλͺ… 톡일
yeseul106 Dec 6, 2023
76be2b2
[#95] add : λͺ¨μž„μ˜ 정보쀑 λͺ¨μž„ μ†Œκ°œ 데이터 ν•„λ“œ μΆ”κ°€
yeseul106 Dec 8, 2023
3d58b21
[#99] fix: CORS κ΄€λ ¨ config μΆ”κ°€
yeseul106 Dec 9, 2023
6b04492
[#101] fix: swaggerμ—μ„œ Authorize 정상 μž‘λ™ν•˜λ„λ‘ μˆ˜μ •
yeseul106 Dec 9, 2023
93a82a2
[#101] fix: deprecated된 security cors μ„€μ • μ½”λ“œ μˆ˜μ •
yeseul106 Dec 9, 2023
1af5a91
[#101] add: cors allow origin dev ν™˜κ²½ url μΆ”κ°€
yeseul106 Dec 9, 2023
52a3f56
[#101] add: cors allow origin dev ν™˜κ²½ url μΆ”κ°€
yeseul106 Dec 9, 2023
c9fd089
[#94] fix: docker-compose λΉŒλ“œμ‹œ datasource error μ‚­μ œ
rdd9223 Dec 6, 2023
72718f5
[#94] env: traefik 뢙이기
rdd9223 Dec 6, 2023
4c7dfb4
[#94] env: spring port λ³€κ²½
rdd9223 Dec 9, 2023
4c3429a
[#94] env: caddy 적용
rdd9223 Dec 9, 2023
f86b377
[#94] docs: spring swagger μš”μ²­μ‹œ https둜 μš”μ²­ν•˜κ²Œ λ³€κ²½
rdd9223 Dec 9, 2023
c004640
[#94] env: devν™˜κ²½ 도메인 적용
rdd9223 Dec 9, 2023
aea2931
[#94] env: nestjs λΉŒλ“œμ€‘ λ©”λͺ¨λ¦¬ λˆ„μˆ˜λ‘œ μΈν•œ μž„μ‹œμ‘°μΉ˜
rdd9223 Dec 9, 2023
170cda7
[#94] env: nestjs λΉŒλ“œμ€‘ λ©”λͺ¨λ¦¬ λˆ„μˆ˜λ‘œ μΈν•œ μž„μ‹œμ‘°μΉ˜2
rdd9223 Dec 9, 2023
4142e53
[#94] env: nestjs λΉŒλ“œμ€‘ λ©”λͺ¨λ¦¬ λˆ„μˆ˜λ‘œ μΈν•œ μž„μ‹œμ‘°μΉ˜3
rdd9223 Dec 9, 2023
cd13271
[#94] env: devν™˜κ²½ 배포λ₯Ό μœ„ν•œ μ»¨ν…Œμ΄λ„ˆ 포트 μž„μ‹œ 개방
rdd9223 Dec 9, 2023
b43858a
[#94] env: devν™˜κ²½ 배포λ₯Ό μœ„ν•œ swagger url μž„μ‹œ λ³€κ²½
rdd9223 Dec 9, 2023
7d66e84
Revert "[#94] env: devν™˜κ²½ 배포λ₯Ό μœ„ν•œ μ»¨ν…Œμ΄λ„ˆ 포트 μž„μ‹œ 개방"
rdd9223 Dec 9, 2023
bc45cb7
Revert "[#94] env: devν™˜κ²½ 배포λ₯Ό μœ„ν•œ swagger url μž„μ‹œ λ³€κ²½"
rdd9223 Dec 9, 2023
4bedb0d
[#94] env: vscode 디렉토리 git ignore μΆ”κ°€
rdd9223 Dec 9, 2023
1fd0f5b
[#94] env: ν™˜κ²½λ³„ docker-compose 파일 생성
rdd9223 Dec 9, 2023
7c73a06
[#94] env: λ‘œκΉ… μ£ΌκΈ° μΆ”κ°€
rdd9223 Dec 9, 2023
95fc039
[#94] docs: 배포 κ΄€λ ¨ README λ‚΄μš© μ—…λ°μ΄νŠΈ
rdd9223 Dec 9, 2023
dcd478f
[#104] v1.0.0
rdd9223 Dec 9, 2023
8d4a9f4
[#107] env: spring Prod ν™˜κ²½λ³€μˆ˜ μΆ”κ°€
rdd9223 Dec 9, 2023
53fb578
[#109] v1.0.1
rdd9223 Dec 9, 2023
1b37147
[#111] fix: spring Prod swagger λ³€κ²½
rdd9223 Dec 9, 2023
5778583
[#112] v1.0.2
rdd9223 Dec 9, 2023
36b912a
[ADD] #122 νŽ˜μ΄μ§€λ„€μ΄μ…˜ κ΄€λ ¨ 파일 μΆ”κ°€
yeseul106 Jan 24, 2024
67bd1b4
[FEAT] #122 ν”Œλ ˆμ΄κ·ΈλΌμš΄λ“œ λ‚΄ λ§ˆμ΄νŽ˜μ΄μ§€ λͺ¨μž„ μ˜μ—­ 데이터 쑰회 api 개발
yeseul106 Jan 24, 2024
0081c1d
[FIX] #122 user repository에 λˆ„λ½λœ 쑰회 쿼리 μ½”λ“œ μΆ”κ°€
yeseul106 Jan 24, 2024
61eb0f4
env: λΌμš°νŒ… κ·œμΉ™ λ³€κ²½
rdd9223 Jan 28, 2024
cb6be40
env: λΌμš°νŒ… κ·œμΉ™ λ³€κ²½2
rdd9223 Jan 28, 2024
22f5231
env: λΌμš°νŒ… κ·œμΉ™ λ³€κ²½3
rdd9223 Jan 28, 2024
88c661a
env: λΌμš°νŒ… κ·œμΉ™ λ³€κ²½4
rdd9223 Jan 28, 2024
c3e0b9c
env: λΌμš°νŒ… κ·œμΉ™ λ³€κ²½5
rdd9223 Jan 28, 2024
942ddd9
env: λΌμš°νŒ… κ·œμΉ™ λ³€κ²½6
rdd9223 Jan 28, 2024
f68aaf0
env: μ‚¬μš©ν•˜μ§€ μ•ŠλŠ” 도메인 제거
rdd9223 Jan 28, 2024
37e593b
env: λΌμš°νŒ… κ·œμΉ™ λ³€κ²½ 7
rdd9223 Jan 28, 2024
e0ecaf3
[#119] feat: λͺ¨μž„ κ²Œμ‹œκΈ€ μž‘μ„± API λ§ˆμ΄κ·Έλ ˆμ΄μ…˜
yeseul106 Jan 31, 2024
f3b7c72
[#119] feat: λ‚΄κ°€ μ†ν•œ λͺ¨μž„에 ν”Όλ“œκΈ€μ΄ 생성될 λ•Œ μ•Œλ¦Ό ꡬ좕
yeseul106 Feb 1, 2024
e78f698
[#119] chore: λ‚΄ λͺ¨μž„에 μƒˆλ‘œμš΄ ν”Όλ“œ 생성될 λ•Œ μ•Œλ¦Ό 타이틀 λ³€κ²½
yeseul106 Feb 2, 2024
e049a88
[#119] rename: μ•Œλ¦Ό μ„œλ²„ 톡신 κ΄€λ ¨ νŒ¨ν‚€μ§€λͺ… μˆ˜μ •
yeseul106 Feb 5, 2024
778af99
[#119] chore: JavaDoc λ¬Έλ²•μœΌλ‘œ 주석 μˆ˜μ •
yeseul106 Feb 5, 2024
0bc31eb
[#119] refactor: ν‘Έμ‹œ μ•Œλ¦Ό κ΄€λ ¨ μƒμˆ˜κ°’ enum으둜 μ„ μ–Έ
yeseul106 Feb 5, 2024
a888fbc
[#125] feat: λͺ¨μž„ ν™ˆ κ°œμ„  - λͺ¨μž„ λ‘˜λŸ¬λ³΄κΈ° API 개발
rdd9223 Feb 12, 2024
4fa17d3
[#125] feat: λͺ¨μž„ ν™ˆ κ°œμ„  - λͺ¨μž„ λ‘˜λŸ¬λ³΄κΈ° API μ‘λ‹΅μ—μ„œ λΆˆν•„μš” ν•„λ“œ 제거
rdd9223 Feb 20, 2024
3ae9dfd
[FEAT] κΉƒν—ˆλΈŒ μ•‘μ…˜ μ›Œν¬ ν”Œλ‘œμš° μž‘μ„±
mikekks Mar 16, 2024
23cd1f1
[DEL] μ‚¬μš©ν•˜μ§€ μ•ŠλŠ” 파일 μ‚­μ œ
mikekks Mar 16, 2024
6ccbcdd
[FEAT] 도컀 컴포즈 파일 blue-green μ»¨ν…Œμ΄λ„ˆμ— 맞게 μˆ˜μ •
mikekks Mar 16, 2024
47a9d34
[FEAT] deploy.sh μΆ”κ°€
mikekks Mar 16, 2024
4856198
[FIX] μ˜€νƒ€μˆ˜μ •
mikekks Mar 17, 2024
7b8adba
[ADD] healthcheck μΆ”κ°€
mikekks Mar 17, 2024
c4dbcf4
[DEL] deploy.sh μ‚­μ œ
mikekks Mar 17, 2024
c794177
[ADD] aws μ ‘κ·Ό ν”Œλ‘œμš° μΆ”κ°€
mikekks Mar 17, 2024
1f88154
[CHORE] dev-CD.yml 파일 κΆŒν•œ λΆ€μ—¬ λͺ…λ Ήμ–΄ μΆ”κ°€
mikekks Mar 17, 2024
98aef21
[FIX]
sgh002400 Mar 17, 2024
68355a6
[FIX] spring, nestjs 이미지에 νƒœκ·Έ μΆ”κ°€
sgh002400 Mar 17, 2024
c794feb
[CHORE] docker 파일 μˆ˜μ •
mikekks Mar 18, 2024
52ca03c
[CHORE] dockerfile μˆ˜μ •
mikekks Mar 18, 2024
88190fa
Revert "[CHORE] dockerfile μˆ˜μ •"
mikekks Mar 19, 2024
02d022b
Revert "[CHORE] docker 파일 μˆ˜μ •"
mikekks Mar 19, 2024
5b03793
Revert "[FIX] spring, nestjs 이미지에 νƒœκ·Έ μΆ”κ°€"
mikekks Mar 19, 2024
b1d2cc5
Revert "[FIX]"
mikekks Mar 19, 2024
2465a62
Revert "[CHORE] dev-CD.yml 파일 κΆŒν•œ λΆ€μ—¬ λͺ…λ Ήμ–΄ μΆ”κ°€"
mikekks Mar 19, 2024
454e35e
Revert "[ADD] aws μ ‘κ·Ό ν”Œλ‘œμš° μΆ”κ°€"
mikekks Mar 19, 2024
c48af5e
Revert "[DEL] deploy.sh μ‚­μ œ"
mikekks Mar 19, 2024
85cf671
Revert "[ADD] healthcheck μΆ”κ°€"
mikekks Mar 19, 2024
df55cd0
Revert "[FIX] μ˜€νƒ€μˆ˜μ •"
mikekks Mar 19, 2024
0f451b2
Revert "[FEAT] deploy.sh μΆ”κ°€"
mikekks Mar 19, 2024
fc19db8
Revert "[FEAT] 도컀 컴포즈 파일 blue-green μ»¨ν…Œμ΄λ„ˆμ— 맞게 μˆ˜μ •"
mikekks Mar 19, 2024
6af09de
Revert "[DEL] μ‚¬μš©ν•˜μ§€ μ•ŠλŠ” 파일 μ‚­μ œ"
mikekks Mar 19, 2024
36b07fc
Revert "[FEAT] κΉƒν—ˆλΈŒ μ•‘μ…˜ μ›Œν¬ ν”Œλ‘œμš° μž‘μ„±"
mikekks Mar 19, 2024
0c21790
[REVERT] 이전 μ»€λ°‹μœΌλ‘œ λ‘€λ°±
mikekks Mar 19, 2024
130e17f
[FIX] λ‚΄κ°€ μ†ν•œ λͺ¨μž„ 쑰회 API, 401 μ—λŸ¬ ν•΄κ²°
yeseul106 Mar 21, 2024
87cd589
[CHORE] ν™œλ™κΈ°μˆ˜ λ³€κ²½
mikekks Mar 22, 2024
9bcf55c
[FIX] ν”Œκ·Έ λ§ˆμ΄νŽ˜μ΄μ§€ λ‚΄ λͺ¨μž„ 쑰회 API, 204 status code μ‹œ 성곡 response body둜 내렀가도둝 μˆ˜μ •
yeseul106 Mar 22, 2024
e0dbb80
Merge branch 'main' into develop
yeseul106 Mar 22, 2024
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
76 changes: 76 additions & 0 deletions .github/workflows/dev-CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: DEV CD

on:
push:
branches: [ "develop" ]

jobs:
deploy-ci:
runs-on: ubuntu-22.04
env:
working-directory-spring: main
working-directory-nestjs: server

steps:
- name: checkout
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install dependencies (npm μ˜μ‘΄μ„± μ„€μΉ˜)
run: npm install
working-directory: ${{ env.working-directory-nestjs }}

- name: resources 폴더 λ‚΄ application-secret.properties 파일 생성
run: |
mkdir -p src/main/resources
echo "${{ secrets.APPLICATION_SECRET }}" > src/main/resources/application-secret.properties
working-directory: ${{ env.working-directory-spring }}

- name: nestjs 폴더 λ‚΄ .dev.env 파일 생성
run: |
echo "${{ secrets.APPLICATION_SECRET }}" > .dev.env
working-directory: ${{ env.working-directory-nestjs }}

- name: Build (Spring)
run: |
chmod +x gradlew
./gradlew clean build
working-directory: ${{ env.working-directory-spring }}
shell: bash

- name: Build (nestjs)
run: npm run build
working-directory: ${{ env.working-directory-nestjs }}

### μ—¬κΈ°κΉŒμ§€ CI와 거의 동일

- name: docker build κ°€λŠ₯ν•˜λ„λ‘ ν™˜κ²½ μ„€μ •
uses: docker/setup-buildx-action@v2

- name: docker hub에 둜그인
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_LOGIN_USERNAME }}
password: ${{ secrets.DOCKERHUB_LOGIN_ACCESSTOKEN }}

- name: docker image λΉŒλ“œ 및 ν‘Έμ‹œ (Spring)
run: |
docker build --platform linux/amd64 -t makerscrew/main .
docker push makerscrew/main
working-directory: ${{ env.working-directory-spring }}

- name: docker image λΉŒλ“œ 및 ν‘Έμ‹œ (nestjs)
run: |
docker build --platform linux/amd64 -t makerscrew/server .
docker push makerscrew/server
working-directory: ${{ env.working-directory-nestjs }}
6 changes: 3 additions & 3 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ version: "3.7"
services:
swagger:
labels:
caddy: localhost crew.api.dev.sopt.org www.crew.api.dev.sopt.org
caddy: localhost crew.api.dev.sopt.org

spring:
environment:
- SPRING_PROFILES_ACTIVE=dev
labels:
caddy: localhost crew.api.dev.sopt.org www.crew.api.dev.sopt.org
caddy: localhost crew.api.dev.sopt.org

nestjs:
environment:
- NODE_ENV=dev
labels:
caddy: localhost crew.api.dev.sopt.org www.crew.api.dev.sopt.org
caddy: localhost crew.api.dev.sopt.org
6 changes: 3 additions & 3 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ version: "3.7"
services:
swagger:
labels:
caddy: localhost crew.api.prod.sopt.org www.crew.api.prod.sopt.org
caddy: localhost crew.api.prod.sopt.org

spring:
environment:
- SPRING_PROFILES_ACTIVE=prod
labels:
caddy: localhost crew.api.prod.sopt.org www.crew.api.prod.sopt.org
caddy: localhost crew.api.prod.sopt.org

nestjs:
environment:
- NODE_ENV=prod
labels:
caddy: localhost crew.api.prod.sopt.org www.crew.api.prod.sopt.org
caddy: localhost crew.api.prod.sopt.org
22 changes: 14 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ services:
caddy.route_2.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_3: /user/v2/*
caddy.route_3.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_4: /meeting/v2/*
caddy.route_4.reverse_proxy: "{{ upstreams 4000 }}"

nestjs:
build:
Expand Down Expand Up @@ -97,22 +99,26 @@ services:
caddy.route_3.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_4: /comment/v1/*
caddy.route_4.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_5: /meeting
caddy.route_5: /meeting/apply
caddy.route_5.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_6: /meeting/*
caddy.route_6: /meeting
caddy.route_6.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_7: /notice/v1
caddy.route_7: /meeting/v1/*
caddy.route_7.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_8: /notice/v1/*
caddy.route_8: /meeting/*
caddy.route_8.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_9: /post/v1
caddy.route_9: /notice/v1
caddy.route_9.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_10: /post/v1/*
caddy.route_10: /notice/v1/*
caddy.route_10.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_11: /users
caddy.route_11: /post/v1
caddy.route_11.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_12: /users/*
caddy.route_12: /post/v1/*
caddy.route_12.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_13: /users
caddy.route_13.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_14: /users/*
caddy.route_14.reverse_proxy: "{{ upstreams 3000 }}"

networks:
caddy:
Expand Down
18 changes: 16 additions & 2 deletions main/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'org.sopt.makers.crew'
version = '1.0.0'
version = '1.1.0'

java {
sourceCompatibility = '17'
Expand All @@ -24,7 +24,7 @@ repositories {
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
// https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui
implementation 'io.hypersistence:hypersistence-utils-hibernate-60:3.5.2'
implementation 'io.hypersistence:hypersistence-utils-hibernate-62:3.6.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
implementation 'org.springframework.boot:spring-boot-starter-webflux:3.1.5'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
Expand All @@ -40,8 +40,22 @@ dependencies {
implementation group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.5'
implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.5'
implementation 'com.auth0:java-jwt:4.4.0'

implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:4.0.3'
}

tasks.named('test') {
useJUnitPlatform()
}

ext {
set('springCloudVersion', "2022.0.3")
}

dependencyManagement {

imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.sopt.makers.crew.main.common.config;

import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;

@EnableFeignClients(basePackages = "org.sopt.makers.crew.main.internal.notification")
@Configuration
public class FeignClientConfig {

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,47 @@ public class SecurityConfig {
};

private static final String[] AUTH_WHITELIST = {
"/health"
"/health",
"meeting/v2/org-user/**"
};

@Bean
@Profile("dev")
SecurityFilterChain devSecurityFilterChain(HttpSecurity http) throws Exception {
http.csrf((csrfConfig) ->
csrfConfig.disable()
)
http.csrf((csrfConfig) -> csrfConfig.disable())
.cors(Customizer.withDefaults())
.sessionManagement((sessionManagement) ->
sessionManagement.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
)
.sessionManagement(
(sessionManagement) -> sessionManagement.sessionCreationPolicy(
SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(
authorize -> authorize.requestMatchers(AUTH_WHITELIST).permitAll()
.requestMatchers(SWAGGER_URL).permitAll()
.anyRequest().authenticated()
)
.anyRequest().authenticated())
.addFilterBefore(
new JwtAuthenticationFilter(jwtTokenProvider, jwtAuthenticationEntryPoint),
new JwtAuthenticationFilter(this.jwtTokenProvider, this.jwtAuthenticationEntryPoint),
UsernamePasswordAuthenticationFilter.class)
.exceptionHandling(exceptionHandling ->
exceptionHandling.authenticationEntryPoint(jwtAuthenticationEntryPoint)
);
.exceptionHandling(exceptionHandling -> exceptionHandling
.authenticationEntryPoint(this.jwtAuthenticationEntryPoint));
return http.build();
}

@Bean
@Profile("prod")
SecurityFilterChain prodSecurityFilterChain(HttpSecurity http) throws Exception {
http.csrf((csrfConfig) -> csrfConfig.disable())
.cors(Customizer.withDefaults())
.sessionManagement(
(sessionManagement) -> sessionManagement.sessionCreationPolicy(
SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(
authorize -> authorize.requestMatchers(AUTH_WHITELIST).permitAll()
.requestMatchers(SWAGGER_URL).permitAll()
.anyRequest().authenticated())
.addFilterBefore(
new JwtAuthenticationFilter(this.jwtTokenProvider, this.jwtAuthenticationEntryPoint),
UsernamePasswordAuthenticationFilter.class)
.exceptionHandling(exceptionHandling -> exceptionHandling
.authenticationEntryPoint(this.jwtAuthenticationEntryPoint));
return http.build();
}

Expand All @@ -80,4 +97,4 @@ CorsConfigurationSource corsConfigurationSource() {
return source;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public OpenAPI openAPI() {

Info info = new Info()
.title("Crew API λ¬Έμ„œ")
.version("1.0.0")
.version("1.1.0")
.description("Crew API λ¬Έμ„œ");

String jwtSchemeName = "JWT Authorization";
Expand All @@ -39,4 +39,4 @@ public OpenAPI openAPI() {
.addSecurityItem(securityRequirement)
.components(components);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.sopt.makers.crew.main.common.exception;

import org.springframework.http.HttpStatus;

public class ForbiddenException extends BaseException {

public ForbiddenException() {
super(HttpStatus.FORBIDDEN);
}

public ForbiddenException(String message) {
super(HttpStatus.FORBIDDEN, message);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.sopt.makers.crew.main.common.exception;

import org.springframework.http.HttpStatus;

public class NoContentException extends BaseException {

public NoContentException() {
super(HttpStatus.NO_CONTENT);
}

public NoContentException(String message) {
super(HttpStatus.NO_CONTENT, message);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package org.sopt.makers.crew.main.common.pagination.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;

@Getter
public class PageMetaDto {

@Schema(description = "νŽ˜μ΄μ§€ μœ„μΉ˜")
private int page;

@Schema(description = "κ°€μ Έμ˜¬ 데이터 개수")
private int take;

@Schema(description = "응닡 데이터 개수")
private int itemCount;

@Schema(description = "총 νŽ˜μ΄μ§€ 수")
private int pageCount;

@Schema(description = "이전 νŽ˜μ΄μ§€κ°€ μžˆλŠ”μ§€ 유무")
private boolean hasPreviousPage;

@Schema(description = "λ‹€μŒ νŽ˜μ΄μ§€κ°€ μžˆλŠ”μ§€ 유무")
private boolean hasNextPage;

public PageMetaDto(PageOptionsDto pageOptionsDto, int itemCount) {
this.page = pageOptionsDto.getPage();
this.take = pageOptionsDto.getTake();
this.itemCount = itemCount;
this.pageCount = (int) Math.ceil((double) this.itemCount / this.take);
this.hasPreviousPage = this.page > 1;
this.hasNextPage = this.page < this.pageCount;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.sopt.makers.crew.main.common.pagination.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import lombok.Getter;

@Getter
public class PageOptionsDto {

@Schema(description = "각 νŽ˜μ΄μ§€", defaultValue = "1", example = "1")
@Min(1)
private Integer page;

@Schema(description = "κ°€μ Έμ˜¬ 데이터 개수", defaultValue = "12", example = "12")
@Min(1)
@Max(50)
private Integer take;

public PageOptionsDto(Integer page, Integer take) {
this.page = page == null ? 1 : page;
this.take = take == null ? 12 : take;
}
}
Loading
Loading