Skip to content

Commit 998e043

Browse files
authored
[RELEASE] 250927 릴리즈
[RELEASE] 250927 릴리즈
2 parents 645f620 + 17aa696 commit 998e043

97 files changed

Lines changed: 1853 additions & 498 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @Gyuhyeok99 @nayonsoso @wibaek @whqtker @lsy1307
1+
* @Gyuhyeok99 @wibaek @whqtker @lsy1307 @Hexeong @JAEHEE25 @sukangpunch

.github/workflows/dev-cd.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,28 @@ jobs:
7171
source: "./docs/infra-config/config.alloy"
7272
target: "/home/${{ secrets.DEV_USERNAME }}/solid-connection-dev/"
7373

74-
- name: Run docker compose
74+
- name: Copy nginx config to remote
75+
uses: appleboy/scp-action@master
76+
with:
77+
host: ${{ secrets.DEV_HOST }}
78+
username: ${{ secrets.DEV_USERNAME }}
79+
key: ${{ secrets.DEV_PRIVATE_KEY }}
80+
source: "./docs/infra-config/nginx.dev.conf"
81+
target: "/home/${{ secrets.DEV_USERNAME }}/solid-connection-dev/nginx"
82+
rename: "default.conf"
83+
84+
- name: Run docker compose and apply nginx config
7585
uses: appleboy/ssh-action@master
7686
with:
7787
host: ${{ secrets.DEV_HOST }}
7888
username: ${{ secrets.DEV_USERNAME }}
7989
key: ${{ secrets.DEV_PRIVATE_KEY }}
8090
script_stop: true
8191
script: |
92+
sudo cp /home/${{ secrets.DEV_USERNAME }}/solid-connection-dev/nginx/default.conf /etc/nginx/conf.d/default.conf
93+
sudo nginx -t
94+
sudo nginx -s reload
95+
8296
cd /home/${{ secrets.DEV_USERNAME }}/solid-connection-dev
83-
docker compose down
97+
docker compose -f docker-compose.dev.yml down
8498
docker compose -f docker-compose.dev.yml up -d --build

.github/workflows/prod-cd.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,28 @@ jobs:
7171
source: "./docs/infra-config/config.alloy"
7272
target: "/home/${{ secrets.USERNAME }}/solid-connect-server/"
7373

74-
- name: Run docker compose
74+
- name: Copy nginx config to remote
75+
uses: appleboy/scp-action@master
76+
with:
77+
host: ${{ secrets.HOST }}
78+
username: ${{ secrets.USERNAME }}
79+
key: ${{ secrets.PRIVATE_KEY }}
80+
source: "./docs/infra-config/nginx.prod.conf"
81+
target: "/home/${{ secrets.USERNAME }}/solid-connection-prod/nginx"
82+
rename: "default.conf"
83+
84+
- name: Run docker compose and apply nginx config
7585
uses: appleboy/ssh-action@master
7686
with:
7787
host: ${{ secrets.HOST }}
7888
username: ${{ secrets.USERNAME }}
7989
key: ${{ secrets.PRIVATE_KEY }}
8090
script_stop: true
8191
script: |
92+
sudo cp /home/${{ secrets.USERNAME }}/solid-connection-prod/nginx/default.conf /etc/nginx/conf.d/default.conf
93+
sudo nginx -t
94+
sudo nginx -s reload
95+
8296
cd /home/${{ secrets.USERNAME }}/solid-connect-server
83-
docker compose down
97+
docker compose -f docker-compose.prod.yml down
8498
docker compose -f docker-compose.prod.yml up -d --build

docker-compose.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ services:
4141
- "12345:12345"
4242
volumes:
4343
- ./logs:/var/log/spring
44-
- ./docs/config.alloy:/etc/alloy/config.alloy:ro
44+
- ./docs/infra-config/config.alloy:/etc/alloy/config.alloy:ro
4545
environment:
4646
- ALLOY_ENV=dev

docker-compose.prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ services:
4040
- "12345:12345"
4141
volumes:
4242
- ./logs:/var/log/spring
43-
- ./docs/config.alloy:/etc/alloy/config.alloy:ro
43+
- ./docs/infra-config/config.alloy:/etc/alloy/config.alloy:ro
4444
environment:
4545
- ALLOY_ENV=production
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
server {
22
listen 80;
3+
server_name api.stage.solid-connection.com;
34

45
# http를 사용하는 경우 주석 해제
56
# location / {
@@ -17,9 +18,10 @@ server {
1718

1819
server {
1920
listen 443 ssl;
21+
server_name api.stage.solid-connection.com;
2022

21-
ssl_certificate /etc/letsencrypt/live/api.solid-connection.com/fullchain.pem;
22-
ssl_certificate_key /etc/letsencrypt/live/api.solid-connection.com/privkey.pem;
23+
ssl_certificate /etc/letsencrypt/live/api.stage.solid-connection.com/fullchain.pem;
24+
ssl_certificate_key /etc/letsencrypt/live/api.stage.solid-connection.com/privkey.pem;
2325
client_max_body_size 10M;
2426

2527
ssl_protocols TLSv1.2 TLSv1.3;
@@ -31,10 +33,13 @@ server {
3133
ssl_stapling_verify on;
3234

3335
location / {
34-
proxy_pass http://solid-connection-server:8080;
36+
proxy_pass http://localhost:8080;
3537
proxy_set_header Host $host;
3638
proxy_set_header X-Real-IP $remote_addr;
3739
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
3840
proxy_set_header X-Forwarded-Proto $scheme;
41+
proxy_http_version 1.1;
42+
proxy_set_header Upgrade $http_upgrade;
43+
proxy_set_header Connection "upgrade";
3944
}
40-
}
45+
}

docs/infra-config/nginx.prod.conf

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
server {
2+
listen 80;
3+
server_name api.solid-connection.com;
4+
5+
location / {
6+
return 301 https://$host$request_uri;
7+
}
8+
}
9+
10+
server {
11+
listen 443 ssl;
12+
server_name api.solid-connection.com;
13+
14+
ssl_certificate /etc/letsencrypt/live/api.solid-connection.com/fullchain.pem;
15+
ssl_certificate_key /etc/letsencrypt/live/api.solid-connection.com/privkey.pem;
16+
client_max_body_size 10M;
17+
18+
ssl_protocols TLSv1.2 TLSv1.3;
19+
ssl_prefer_server_ciphers on; # 클라이언트 보다 서버의 암호화 알고리즘을 우선하도록 설정
20+
ssl_ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256";
21+
ssl_session_cache shared:SSL:10m; # SSL 세션 캐시 설정
22+
ssl_session_timeout 10m;
23+
ssl_stapling on; # OCSP 스테이플링 활성화
24+
ssl_stapling_verify on;
25+
26+
location / {
27+
proxy_pass http://127.0.0.1:8080;
28+
proxy_set_header Host $host;
29+
proxy_set_header X-Real-IP $remote_addr;
30+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
31+
proxy_set_header X-Forwarded-Proto $scheme;
32+
proxy_http_version 1.1;
33+
proxy_set_header Upgrade $http_upgrade;
34+
proxy_set_header Connection "upgrade";
35+
}
36+
}

src/main/java/com/example/solidconnection/application/controller/ApplicationController.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import com.example.solidconnection.application.service.ApplicationQueryService;
77
import com.example.solidconnection.application.service.ApplicationSubmissionService;
88
import com.example.solidconnection.common.resolver.AuthorizedUser;
9-
import com.example.solidconnection.security.annotation.RequireRoleAccess;
10-
import com.example.solidconnection.siteuser.domain.Role;
119
import jakarta.validation.Valid;
1210
import lombok.RequiredArgsConstructor;
1311
import org.springframework.http.HttpStatus;
@@ -39,7 +37,7 @@ public ResponseEntity<ApplicationSubmissionResponse> apply(
3937
.body(applicationSubmissionResponse);
4038
}
4139

42-
@RequireRoleAccess(roles = {Role.ADMIN})
40+
// @RequireRoleAccess(roles = {Role.ADMIN}) // todo : 추후 어드민 페이지에서 권한 변경 기능 추가 필요
4341
@GetMapping
4442
public ResponseEntity<ApplicationsResponse> getApplicants(
4543
@AuthorizedUser long siteUserId,

src/main/java/com/example/solidconnection/auth/client/AppleOAuthClient.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
import org.springframework.web.client.RestTemplate;
2626

2727
/*
28-
* 애플 인증을 위한 OAuth2 클라이언트
29-
* https://developer.apple.com/documentation/signinwithapplerestapi/generate_and_validate_tokens
28+
* - 애플 인증을 위한 OAuth2 클라이언트
29+
* - https://developer.apple.com/documentation/signinwithapplerestapi/generate_and_validate_tokens
30+
* - OAuthClient 인터페이스를 사용하는 전략 패턴으로 구현됨
3031
* */
3132
@Component
3233
@RequiredArgsConstructor

src/main/java/com/example/solidconnection/auth/client/KakaoOAuthClient.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
import org.springframework.web.util.UriComponentsBuilder;
2424

2525
/*
26-
* 카카오 인증을 위한 OAuth2 클라이언트
27-
* https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#request-code
28-
* https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#request-token
29-
* https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#req-user-info
26+
* - 카카오 인증을 위한 OAuth2 클라이언트
27+
* - https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#request-code
28+
* - https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#request-token
29+
* - https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#req-user-info
30+
* - OAuthClient 인터페이스를 사용하는 전략 패턴으로 구현됨
3031
* */
3132
@Component
3233
@RequiredArgsConstructor

0 commit comments

Comments
 (0)