-
Notifications
You must be signed in to change notification settings - Fork 1
feat: userId 카카오 로그인에서 추출 #10
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
1177271
473dde2
64b3bb4
55d4870
c9d5839
0884c30
f15001a
6a7de02
834da0e
0c63207
15de794
8388b23
a5211f1
dd82c55
cfc8b9f
8e8e179
41cf4bb
9d3a03f
e0b06ed
53c941d
91c8e6d
dab0be3
e5fe0f9
697b912
1325389
9b1d5ee
7a807d2
5f4861f
d5ca147
2fb875a
97821a9
5b07aeb
5febf7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -111,9 +111,9 @@ jobs: | |||||||||||||||||||||||||
| DB_USERNAME=admin | ||||||||||||||||||||||||||
| DB_PASSWORD=${{ secrets.DB_PASSWORD }} | ||||||||||||||||||||||||||
| DB_PORT=3306 | ||||||||||||||||||||||||||
| REDIS_HOST=172.17.0.1 | ||||||||||||||||||||||||||
| REDIS_HOST=redis | ||||||||||||||||||||||||||
| REDIS_PORT=6379 | ||||||||||||||||||||||||||
| REDIS_PASSWORD=1234 | ||||||||||||||||||||||||||
| REDIS_PASSWORD= | ||||||||||||||||||||||||||
|
Comment on lines
+112
to
+116
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 환경 변수에 비밀번호를 하드코딩하지 마세요.
- DB_PASSWORD=wisecard
+ DB_PASSWORD=${{ secrets.DB_PASSWORD }}
...
- REDIS_PASSWORD=
+ REDIS_PASSWORD=${{ secrets.REDIS_PASSWORD }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| APP_API_KAKAO_KEY=${{ secrets.APP_API_KAKAO_KEY }} | ||||||||||||||||||||||||||
| APP_PORT=8080 | ||||||||||||||||||||||||||
| GRPC_PORT=9091 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,11 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| services: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Redis는 AWS ElastiCache를 사용하므로 로컬 컨테이너 제거 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Redis 컨테이너 추가 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| redis: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image: redis:alpine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| container_name: redis | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| restart: unless-stopped | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| networks: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - wisecard-network | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+3
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redis 서비스 구성에 보안 및 데이터 지속성 문제가 있습니다. Redis 서비스를 추가한 것은 좋지만 다음 문제들을 해결해야 합니다:
다음과 같이 개선하는 것을 권장합니다: redis:
image: redis:alpine
container_name: redis
restart: unless-stopped
+ command: redis-server --requirepass ${REDIS_PASSWORD}
+ volumes:
+ - redis_data:/data
+ deploy:
+ resources:
+ limits:
+ memory: 512M
+ cpus: '0.5'
networks:
- wisecard-network그리고 volumes:
app_logs:
driver: local
+ redis_data:
+ driver: local또한, 📝 Committable suggestion
Suggested change
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # WiseCard Backend 애플리케이션 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -37,26 +42,10 @@ services: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| retries: 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| start_period: 40s | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Nginx 리버스 프록시 (선택사항) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # nginx: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # image: nginx:alpine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # container_name: wisecard-nginx | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # restart: unless-stopped | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ports: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - "80:80" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - "443:443" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # volumes: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - ./nginx/ssl:/etc/nginx/ssl:ro | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # networks: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - wisecard-network | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # depends_on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - app | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| volumes: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app_logs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| driver: local | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| networks: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wisecard-network: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| driver: bridge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| driver: bridge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||||||||
| package com.example.demo.controller; | ||||||||||||
|
|
||||||||||||
| import org.springframework.web.bind.annotation.RequestMapping; | ||||||||||||
| import org.springframework.web.bind.annotation.RestController; | ||||||||||||
|
|
||||||||||||
| @RestController | ||||||||||||
| @RequestMapping("/api/health") | ||||||||||||
| public class HealthController { | ||||||||||||
|
|
||||||||||||
| @RequestMapping("/check") | ||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major HTTP 메서드를 명시적으로 지정하세요.
+ @GetMapping("/check")
- @RequestMapping("/check")
public String check() {
return "ok";
}As per coding guidelines (Google Java Style Guide와 Spring Framework 모범 사례). 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| public String check() { | ||||||||||||
| return "ok"; | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
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.
프로덕션 환경에서 Redis 비밀번호가 비어있습니다.
배포 워크플로우에서 Redis 비밀번호를 빈 값으로 설정하는 것은 보안 위험입니다.
REDIS_PASSWORD를 추가하세요.다음과 같이 수정하세요:
DB_HOST=${{ secrets.DB_HOST }} DB_NAME=db-wisecard DB_USERNAME=admin DB_PASSWORD=${{ secrets.DB_PASSWORD }} DB_PORT=3306 REDIS_HOST=redis REDIS_PORT=6379 - REDIS_PASSWORD= + REDIS_PASSWORD=${{ secrets.REDIS_PASSWORD }} APP_API_KAKAO_KEY=${{ secrets.APP_API_KAKAO_KEY }} APP_PORT=8080 GRPC_PORT=9091 JWT_SECRET=${{ secrets.JWT_SECRET }}그리고 GitHub repository settings에서
REDIS_PASSWORD시크릿을 추가해야 합니다.📝 Committable suggestion
🤖 Prompt for AI Agents