๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ–ฅ๏ธ ๋ฐฑ์—”๋“œ63

[SSL/TLS] ๋ผ์ดํŠธ์„ธ์ผ ์šฐ๋ถ„ํˆฌ ์ธ์Šคํ„ด์Šค์—์„œ SSL/TLS ์ ์šฉํ•˜๊ธฐ ์‚ฌ์ „์ค€๋น„ ์„œ๋ฒ„ ์‹œ๊ฐ„ ์„ค์ • sudo ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime ์šฐ๋ถ„ํˆฌ ํŒจํ‚ค์ง€ ์ตœ์‹  ์—…๋ฐ์ดํŠธ sudo apt update apt ๋Š” SW ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜, ์—…๋ฐ์ดํŠธ, ์ œ๊ฑฐ ๋“ฑ ๊ด€๋ฆฌ๋ฅผ ์œ„ํ•œ ๋ช…๋ น์–ด ์ž๋ฐ” ์„ค์น˜ sudo apt install openjdk-17 -jdk ์„ค์น˜ ์™„๋ฃŒ ํ›„ ๋ฒ„์ „ ํ™•์ธ java -version nginx ์„ค์น˜ Cerbot ์„ค์น˜ Let's Encrypt๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ SSL/TLS ์ธ์ฆ์„œ๋ฅผ ์ž๋™์œผ๋กœ ๋ฐœ๊ธ‰ํ•˜๊ณ  ๊ฐฑ์‹ ํ•˜๋Š” ๋„๊ตฌ sudo apt install certbot Certbot Nginx ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์น˜ Nginx ์›น ์„œ๋ฒ„์™€ ํ•จ๊ป˜ ์‚ฌ์šฉ๋˜๋ฉฐ, Certbot์„ ์‚ฌ์šฉํ•˜์—ฌ Nginx ์„œ๋ฒ„์— SSL/TLS ์ธ์ฆ์„œ๋ฅผ ์ ์šฉํ•˜๊ณ  ๊ตฌ์„ฑ์„ ์ž๋™.. 2024. 4. 21.
[KakaoPay] ์นด์นด์˜คํŽ˜์ด ๋‹จ๊ฑด ๊ฒฐ์ œ ์ปจํŠธ๋กค๋Ÿฌ ์˜ˆ์‹œ ์•ˆ๋‚ด๊ธ€ ๊ฒฐ์ œ ํ๋ฆ„์„ ๋ณด๊ธฐ ์œ„ํ•ด debug ๋ชจ๋“œ์˜ ๋กœ๊ทธ ์ถœ๋ ฅ์ด ๋งŽ์Šต๋‹ˆ๋‹ค ๊ตฌํ˜„ ์ดˆ๊ธฐ์˜ ์ฝ”๋“œ๋ผ ๋ถ€์กฑํ•œ ๋ถ€๋ถ„์ด ์žˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์–‘ํ•ดํ•ด์ฃผ์„ธ์š”! ํ๋ฆ„์„ ์ดํ•ดํ•˜๊ธฐ ์œ„ํ•ด ๋ฉ”์„œ๋“œ ์•ˆ์—์„œ ๋ชจ๋“  ์ฒ˜๋ฆฌ๋ฅผ ์ง์ ‘ ํ•˜๋„๋ก ์ฝ”๋“œ๋ฅผ ๋‹จ์ˆœํ™”ํ•จ ์นด์นด์˜คํŽ˜์ด ๊ฒฐ์ œ ์ค€๋น„ ์š”์ฒญ ์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•œ REST ์ปจํŠธ๋กค๋Ÿฌ ๋ฉ”์„œ๋“œ ๊ตฌํ˜„ @RestController public class KakaoPayController @PostMapping("/api/pay/kakaopay") public ResponseEntity processKakaoPayRequest(@RequestBody OrderInfoDTO orderInfoDTO) @Transactional @PostMapping("/api/pay/kakaopay") public ResponseEntity p.. 2024. 3. 29.
[KakaoPay] ์นด์นด์˜คํŽ˜์ด ๋‹จ๊ฑด ๊ฒฐ์ œ ๊ณผ์ • ์ค‘ ๊ฒช์€ ์˜ค๋ฅ˜ ๋ชจ์Œ ์˜ค๋ฅ˜์˜ ์›์ธ๋“ค (๊ตฌ) ์นด์นด์˜คํŽ˜์ด API ์—์„œ 2024์— ์ƒˆ๋กœ ๋ฐ”๋€Œ๋ฉด์„œ ํ•„์š”์—†์–ด์ง„ ํ•„๋“œ๊ฐ’ ๋•Œ๋ฌธ์— Jackson ๋ชจ๋“ˆ url ์‹ค์ˆ˜ key๊ฐ’์„ dev์šฉ์œผ๋กœ ์•ˆ์จ์„œ ํ•„๋“œ ๋ถˆ์ผ์น˜ ์ธ์ฆ ํ‚ค ๋ณ€๊ฒฝ๋จ (๊ตฌ) headers.set("Authorization", "KakaoAK " + kakaoPayConfig.getSecretKeyDev()); (์‹ ) headers.set("Authorization", "SECRET_KEY " + kakaoPayConfig.getSecretKeyDev()); ์นด์นด์˜ค๊ฐ€ ์ œ๊ณตํ•˜๋Š” ๊ฒฐ์ œ ์˜ค๋ฅ˜์ฝ”๋“œ ์ •๋ฆฌ ์—‘์…€ํŒŒ์ผ ๋‚ด๊ฐ€ ๊ฒช์€ ์˜ค๋ฅ˜ ๋ฉ”์„ธ์ง€ ์ •๋ฆฌ ์˜ค๋ฅ˜ ๋ฉ”์„ธ์ง€ Create breakpoint ์›์ธ (์ถ”์ธก) ํ•ด๊ฒฐ๋ฐฉ๋ฒ• org.springframework.web.client.HttpClientErrorExc.. 2024. 3. 29.
[KakaoPay] ์นด์นด์˜คํŽ˜์ด ๋‹จ๊ฑด ๊ฒฐ์ œ ๊ธฐ๋Šฅ ๊ตฌํ˜„ ๋ฐฉ๋ฒ• (2024 ์‹ ๊ทœ API ๋ฒ„์ „) ์‚ฌ์ „์ค€๋น„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋“ฑ๋ก https://developers.kakaopay.com/applications ์นด์นด์˜คํŽ˜์ด | ๊ฐœ๋ฐœ์ž์„ผํ„ฐ ์ƒˆ๋กœ์šด ๊ธฐํšŒ์™€ ๊ฐ€์น˜๋ฅผ ํ•จ๊ป˜ ๋งŒ๋“ค์–ด๋ด์š” developers.kakaopay.com ํ‚ค ๋ฐœ๊ธ‰๋ฐ›๊ธฐ ๊ด€๋ จ ๋ฌธ์˜ ํฌ๋Ÿผ https://developers.kakaopay.com/forum/ ํฌ๋Ÿผ ์นด์นด์˜คํŽ˜์ด ๊ฐœ๋ฐœ์ž์„ผํ„ฐ ์ด์šฉ ๊ด€๋ จ ์งˆ๋ฌธ ๋ฐ ๋‹ต๋ณ€์„ ๊ณต์œ ํ•˜๋Š” ์ปค๋ฎค๋‹ˆํ‹ฐ์ž…๋‹ˆ๋‹ค. developers.kakaopay.com 2024 ์นด์นด์˜คํŽ˜์ด API ์ธ์ฆ์‹œ ์‚ฌ์šฉํ•  ๊ฐ’ ์ธ์ฆ ์Šคํ‚ค๋งˆ (๊ตฌ) "KakaoAK " -> (์‹ ) " SECRET_KEY " Secret Key๊ฐ’์€ ํ…Œ์ŠคํŠธ์˜ ๊ฒฝ์šฐ Secret Key(dev) ์‚ฌ์šฉํ•˜๊ธฐ ์นด์นด์˜คํŽ˜์ด ๊ฒฐ์ œ ๊ตฌํ˜„ ๊ณผ์ • OrderInfoDTO : ์‚ฌ์šฉ์ž ์ฃผ๋ฌธ ์ •๋ณด Kakao.. 2024. 3. 29.
[CICD] ๊ธฐ์ดˆ ์‹œ๋‚˜๋ฆฌ์˜ค ๊นƒํ—™ ์•ก์…˜ ๊นƒํ—™์•ก์…˜ ์ฝ”๋“œ ์˜ค๋ฅ˜ ๊ฒ€์‚ฌ ์‚ฌ์ดํŠธ https://rhysd.github.io/actionlint/ actionlint playground Loading WebAssembly binary... Yay! No error was detected. rhysd.github.io ๊ฐ•์˜ ์‹œ๋‚˜๋ฆฌ์˜ค 3 ํ˜„์žฌ ํ”„๋กœ์ ํŠธ์— ํˆฌ์žํ•  ์ˆ˜ ์žˆ๋Š” ์‹œ๊ฐ„์„ ๊ณ ๋ คํ•ด์„œ ์ผ๋‹จ ๊ฐ„๋‹จํ•œ CICD๋ฅผ ์ ์šฉํ•ด๋ณด๊ธฐ ์œ„ํ•ด ์‹œ๋‚˜๋ฆฌ์˜ค 3์„ ์„ ํƒํ•จ ๊ฐ€์ • ๊ฐœ๋ฐœํ™˜๊ฒฝ, QA, ์šด์˜ํ™˜๊ฒฝ์˜ CICD ๊ตฌ์„ฑ branch dev : ๊ฐœ๋ฐœํ™˜๊ฒฝ master : ์šด์˜ํ™˜๊ฒฝ QA ํ…Œ์ŠคํŠธ๋ฅผ ํ†ตํ•ด ์†Œํ”„๋ฅด์›จ์–ด ๊ฒฐํ•จ ์‹๋ณ„ํ•˜๊ธฐ ์ฝ”๋“œ์˜ ํ’ˆ์งˆ๊ณผ ๊ธฐ๋Šฅ์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๋™์ž‘ํ•˜๋Š”์ง€ ๊ฒ€์ฆํ•จ ๋ฐฐํฌ์ˆœ์„œ 1. ๊ฐœ๋ฐœ ํ™˜๊ฒฝ (dev branch) 2. QA ํ™˜๊ฒฝ 3. ์šด์˜ ํ™˜๊ฒฝ (master branch) ๊ธฐ์กด ์š”๊ตฌ.. 2024. 3. 23.
[CICD] ํ‚ค์›Œ๋“œ ๊ธฐ๋ฐ˜ ์ด์Šˆ ์•Œ๋ฆผ ์ž๋™ํ™” 3. ๊ฐ„๋‹จํ•œ ์›Œํฌํ”Œ๋กœ์šฐ ๋งŒ๋“ค๊ธฐ ํ‚ค์›Œ๋“œ ๊ธฐ๋ฐ˜ ์ด์Šˆ ์•Œ๋ฆผ ์ž๋™ํ™” ๋งŒ๋“ค๊ธฐ ์ด์Šˆ๊ฐ€ ์ƒ์„ฑ๋  ๋•Œ ์‹คํ–‰ issue event types: [opened] ํŠน์ • ํ‚ค์›Œ๋“œ๊ฐ€ ํฌํ•จ๋˜๋ฉด ์Šฌ๋ž™์œผ๋กœ ๊ณต์œ ํ•˜๊ธฐ if critical -> ์Šฌ๋ž™์˜ critical-issue ์ฑ„๋„๋กœ ๊ณต์œ  if cormal -> ์Šฌ๋ž™์˜ normal-issue ์ฑ„๋„๋กœ ๊ณต์œ  ํ‚ค์›Œ๋“œ๋Š” ๋ณ€๋™์‚ฌํ•ญ์ด ์ƒ๊ธธ ์ˆ˜ ์žˆ์Œ ๋ณต์žก์„ฑ์„ ์ค„์ด๋Š” ๋ฐฉ๋ฒ• ํ‚ค์›Œ๋“œ ๊ด€๋ฆฌํ•˜๊ธฐ (X) ๊นƒํ—™์•ก์…˜ ์›Œํฌํ”Œ๋กœ์šฐ์—์„œ ๊ด€๋ฆฌ (O) ์™ธ๋ถ€์—์„œ ํ‚ค์›Œ๋“œ ๊ด€๋ฆฌ ex) keyword.txt slack step ์‚ฌ์šฉ ๊ตฌ์กฐ ํ‚ค์›Œ๋“œ๋งŒํผ ์‚ฌ์šฉํ•˜๋ฉด ๊ด€๋ฆฌ๊ฐ€ ์–ด๋ ค์›€ slack step 1๊ฐœ๋กœ ์‚ฌ์šฉํ•˜๊ธฐ ๋™์ผํ•œ ์Šฌ๋ž™ ์›นํ›… ์ด๋ฆ„ ์‚ฌ์šฉํ•˜๊ธฐ ๋™์ผํ•œ ์‹œํฌ๋ฆฟ ์ด๋ฆ„ ์‚ฌ์šฉํ•˜๊ธฐ ${{ secret.SLACK_WEBHOOK }} ๊ตฌ์„ฑ job 2.. 2024. 3. 23.
[CICD] ๊นƒํ—™ ๋ ˆํฌ ์ƒ์„ฑ ์ž๋™ํ™” 3. ๊ฐ„๋‹จํ•œ ์›Œํฌํ”Œ๋กœ์šฐ ๋งŒ๋“ค๊ธฐ ๊นƒํ—› ๋ ˆํฌ ์ƒ์„ฑ ์ž๋™ํ™” name: create-repo on: workflow_dispatch: inputs: prefix: description: 'set repo prefix' required: true default: 'service' type: choice options: - example - service name: description: 'set repo name' required: true default: 'github-actions' type: string jobs: create-repo-automation: runs-on: ubuntu-latest steps: - name: gh auth login run: | echo ${{ secrets.PERSONAL_.. 2024. 3. 23.