From f4a484d58b7c2fd4749c5ce7409d9cb33d481c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=A7=80=EC=9C=A4?= Date: Fri, 15 Aug 2025 21:31:59 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[DOCS]=20application-prod.yml=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-prod.yml | 78 +++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 src/main/resources/application-prod.yml diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..1de4feb --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -0,0 +1,78 @@ +spring: + application: + name: studyLog + + #registration + security: + oauth2: + client: + registration: + kakao: + client-name: kakao # 서비스명 + client-id: ${KAKAO_CLIENT_ID} #서비스에서 발급 받은 아이디(from kakao) + client-secret: ${KAKAO_CLIENT_SECRET} #서비스에서 발급 받은 비밀번호(from kakao) + redirect-uri: ${SERVER_URI}/login/oauth2/code/kakao #서비스에 등록한 우리쪽 로그인 성공 URI + authorization-grant-type: authorization_code # code 방식 사용 + scope: profile_nickname, profile_image # 리소스 서버에서 가져올 데이터 범위 + client-authentication-method: client_secret_post + google: + client-name: google + client-id: ${GOOGLE_CLIENT_ID} + client-secret: ${GOOGLE_CLIENT_SECRET} + redirect-uri: ${SERVER_URI}/login/oauth2/code/google + authorization-grant-type: authorization_code + scope: profile + + #provider(인증/리소스 서버 정보) + provider: + kakao: + authorization-uri: https://kauth.kakao.com/oauth/authorize # 서비스 로그인 창 주소 + token-uri: https://kauth.kakao.com/oauth/token # 토큰 발급 서버 주소 + user-info-uri: https://kapi.kakao.com/v2/user/me # 사용자 정보 획득 주소 + user-name-attribute: id # 응답 데이터 변수 + + + datasource: + hikari: + maximum-pool-size: 4 + url: jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME} + username: ${DB_USER} + password: ${DB_PASS} + driver-class-name: org.postgresql.Driver + + jpa: + hibernate: + ddl-auto: update + show-sql: true + + jwt: + secret: ${JWT_SECRET_KEY} + + logging: + level: + org.springframework.security: DEBUG + io.awspring.cloud.s3: DEBUG + io.awspring.cloud.core: DEBUG + org.example.studylog.controller: DEBUG + + servlet: + multipart: + max-file-size: 10MB # 한개 파일의 최대 사이즈 (default: 1MB) + max-request-size: 10MB # 한개 요청의 최대 사이즈 (default: 10MB) + + # AWS S3 + cloud: + aws: + credentials: + access-key: ${S3_ACCESS_KEY} + secret-key: ${S3_SECRET_KEY} + region: + static: ap-northeast-2 # 버킷의 리전 + s3: + bucket: study-log-1 + stack: + auto: true + + # ChatGPT + openai: + api-key: ${GPT_API_KEY} \ No newline at end of file From 11b3040708164b6d02a10e47ecf2447b5aac9085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=A7=80=EC=9C=A4?= <111862541+y11n@users.noreply.github.com> Date: Sat, 16 Aug 2025 06:44:31 +0900 Subject: [PATCH 2/3] Update CICD.yml --- .github/workflows/CICD.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index fe894b4..fd3d29b 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -27,6 +27,12 @@ jobs: with: java-version: '17' distribution: 'temurin' + + - name: application.yml 추가 + run: | + mkdir -p src/main/resources + echo "${{ secrets.APPLICATION_YML }}" > src/main/resources/application.yml + shell: bash - name: Setup Gradle uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 From 1cb79b00d9f812bfca1b1f0aa2e83b482ede4c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=A7=80=EC=9C=A4?= <111862541+y11n@users.noreply.github.com> Date: Sat, 16 Aug 2025 06:45:57 +0900 Subject: [PATCH 3/3] Delete src/main/resources/application-prod.yml --- src/main/resources/application-prod.yml | 78 ------------------------- 1 file changed, 78 deletions(-) delete mode 100644 src/main/resources/application-prod.yml diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml deleted file mode 100644 index 1de4feb..0000000 --- a/src/main/resources/application-prod.yml +++ /dev/null @@ -1,78 +0,0 @@ -spring: - application: - name: studyLog - - #registration - security: - oauth2: - client: - registration: - kakao: - client-name: kakao # 서비스명 - client-id: ${KAKAO_CLIENT_ID} #서비스에서 발급 받은 아이디(from kakao) - client-secret: ${KAKAO_CLIENT_SECRET} #서비스에서 발급 받은 비밀번호(from kakao) - redirect-uri: ${SERVER_URI}/login/oauth2/code/kakao #서비스에 등록한 우리쪽 로그인 성공 URI - authorization-grant-type: authorization_code # code 방식 사용 - scope: profile_nickname, profile_image # 리소스 서버에서 가져올 데이터 범위 - client-authentication-method: client_secret_post - google: - client-name: google - client-id: ${GOOGLE_CLIENT_ID} - client-secret: ${GOOGLE_CLIENT_SECRET} - redirect-uri: ${SERVER_URI}/login/oauth2/code/google - authorization-grant-type: authorization_code - scope: profile - - #provider(인증/리소스 서버 정보) - provider: - kakao: - authorization-uri: https://kauth.kakao.com/oauth/authorize # 서비스 로그인 창 주소 - token-uri: https://kauth.kakao.com/oauth/token # 토큰 발급 서버 주소 - user-info-uri: https://kapi.kakao.com/v2/user/me # 사용자 정보 획득 주소 - user-name-attribute: id # 응답 데이터 변수 - - - datasource: - hikari: - maximum-pool-size: 4 - url: jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME} - username: ${DB_USER} - password: ${DB_PASS} - driver-class-name: org.postgresql.Driver - - jpa: - hibernate: - ddl-auto: update - show-sql: true - - jwt: - secret: ${JWT_SECRET_KEY} - - logging: - level: - org.springframework.security: DEBUG - io.awspring.cloud.s3: DEBUG - io.awspring.cloud.core: DEBUG - org.example.studylog.controller: DEBUG - - servlet: - multipart: - max-file-size: 10MB # 한개 파일의 최대 사이즈 (default: 1MB) - max-request-size: 10MB # 한개 요청의 최대 사이즈 (default: 10MB) - - # AWS S3 - cloud: - aws: - credentials: - access-key: ${S3_ACCESS_KEY} - secret-key: ${S3_SECRET_KEY} - region: - static: ap-northeast-2 # 버킷의 리전 - s3: - bucket: study-log-1 - stack: - auto: true - - # ChatGPT - openai: - api-key: ${GPT_API_KEY} \ No newline at end of file