Skip to content

Conversation

@lunarbae628
Copy link
Collaborator

@lunarbae628 lunarbae628 commented Oct 22, 2025

๐Ÿ›ฐ๏ธ Issue Number

๐Ÿช ์ž‘์—… ๋‚ด์šฉ

staging ์„œ๋ฒ„

dev์„œ๋ฒ„์— ๋ฐฐํฌ์ „ ํ…Œ์ŠคํŠธ(๋ถ€ํ•˜ํ…Œ์ŠคํŠธ, ๊ธฐ๋Šฅํ…Œ์ŠคํŠธ ๋“ฑ๋“ฑ)์„ ์œ„ํ•ด staging์„œ๋ฒ„ ๊ตฌ์ถ•ํ–ˆ์Šต๋‹ˆ๋‹ค.
์„œ๋ฒ„์˜ ๊ตฌ์กฐ๋Š” dev์„œ๋ฒ„์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.(ํฌํŠธ๋Š” http: 8080, https: 8443)
Mailpit์„ ํ†ตํ•ด ์ด๋ฉ”์ผ ์ธ์ฆ ๋กœ์ง์„ ์‹ค์ œ SMTP ์—†์ด ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ตฌ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค.

Docker Compose ๋ฐ ์ธํ”„๋ผ ๊ตฌ์„ฑ

  • docker-compose.stg.yml ์ถ”๊ฐ€ ๋ฐ staging ๋„คํŠธ์›Œํฌ(docsa_stg_net) ๋ถ„๋ฆฌ
  • ์„œ๋น„์Šค๋ณ„ prefix(-stg)๋กœ ์ปจํ…Œ์ด๋„ˆ๋ช…, ๋ณผ๋ฅจ, ๋„คํŠธ์›Œํฌ ๊ตฌ๋ถ„
  • deploy.sh ์Šคํฌ๋ฆฝํŠธ์— TARGET=stg ์ธ์ž ์ถ”๊ฐ€ โ†’ staging์šฉ compose ์ž๋™ ์„ ํƒ
  • --env-file .stg.env ๊ธฐ๋ฐ˜์œผ๋กœ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ๋ถ„๋ฆฌ ๊ด€๋ฆฌ

Mailpit ๋„์ž… (์ด๋ฉ”์ผ ํ…Œ์ŠคํŠธ ํ™˜๊ฒฝ)

  • axllent/mailpit ์ด๋ฏธ์ง€ ์ถ”๊ฐ€
  • /mailpit/ ๊ฒฝ๋กœ๋กœ ์™ธ๋ถ€์ ‘์† ๊ฐ€๋Šฅ
  • application-stg.yml์— ํ…Œ์ŠคํŠธ์šฉ ๋ฉ”์ผ ์„ค์ • ์ถ”๊ฐ€:
mail:
  host: mailpit
  port: 1025
  username: ${MAIL_USERNAME:[email protected]}
  password: ${MAIL_PASSWORD:docsa!}
  smtp-auth: false
  starttls-enable: false
  • ์‹ค์ œ ๋ฉ”์ผ ๋ฐœ์†ก ์—†์ด Mailpit UI (https://stg.api.docsa.o-r.kr:8443/mailpit/) ์—์„œ ํ™•์ธ ๊ฐ€๋Šฅ(๋ถ€ํ•˜ํ…Œ์ŠคํŠธ์—์„œ ํ™œ์šฉ๋„ ๊ฐ€๋Šฅํ• ๋“ฏ? localํ…Œ์ŠคํŠธ์—์„œ๋„ ์‚ฌ์šฉ๊ฐ€๋Šฅํ• ๋“ฏ)

CI-CD

  • dev์™€ staging๋ธŒ๋žœ์น˜์— push/pr ์‹œ ci-cd๊ฐ€ ์ž‘๋™
  • push/pr๋œ ๋ธŒ๋žœ์น˜ ๊ธฐ์ค€์œผ๋กœ ๋„์ปค์ด๋ฏธ์ง€๊ฐ€ push ๋ฐ ๋ธŒ๋žœ์น˜์— ๋งž์ถ”์–ด ๊ฐ ์„œ๋ฒ„์— ๋ฐฐํฌ๋ฉ๋‹ˆ๋‹ค. (staging์— pushํ•˜๋ฉด stg์„œ๋ฒ„์— ๋ฐฐํฌ๋จ)
  • ๋„์ปค์ด๋ฏธ์ง€ ํƒœ๊ทธ๊ฐ€ ๋ณ€๊ฒฝ. push/pr๋œ ๋ธŒ๋žœ์น˜์— ๋”ฐ๋ผ dev, staging, dev-abc1234, staging-def5678 (SHORT_๊นƒ_SHA 7์ž๋ฆฌ)

๐Ÿ“š Reference

  • staging ์„œ๋ฒ„: https://stg.api.docsa.o-r.kr:8443/

  • staging ๊ทธ๋ผํŒŒ๋‚˜: https://stg.api.docsa.o-r.kr:8443/grafana/

  • staging mailpit ui: https://stg.api.docsa.o-r.kr:8443/mailpit/

  • ๋กœ์ปฌ์—์„œ mailpit์„ ๋„์ปค๋กœ ๋„์›Œ ์ด๋ฉ”์ผ ๊ด€๋ จ ํ…Œ์ŠคํŠธ ๊ฐ€๋Šฅํ•˜๋„๋ก ์ˆ˜์ • ํ–ˆ์Šต๋‹ˆ๋‹ค. (2025.10.25 ์ˆ˜์ • )

    • docker run --name mailpit-local --rm -p 1025:1025 -p 8025:8025 axllent/mailpit:latest
    • ์œ„์ฒ˜๋Ÿผ ๋„์ปค์— mailpit๋ฅผ ๋„์›Œ ๋กœ์ปฌํ˜ธ์ŠคํŠธ:8025๋กœ mailpit ui์ ‘๊ทผ ๋ฐ ์ด๋ฉ”์ผ ํ…Œ์ŠคํŠธ๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
    • ๊ธฐ์กด์ฒ˜๋Ÿผ smtp.gmail๋กœ ์ด๋ฉ”์ผ์„ ๋ฐ›์œผ๋ ค๋ฉด application-local.yml์˜ ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ๋ณ€๊ฒฝํ•˜์‹œ๋ฉด smtp๋กœ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

๊ถ๊ธˆํ•˜๊ฑฐ๋‚˜ ์„ค๋ช…์ด ํ•„์š”ํ•˜์‹œ๋ฉด ์–ธ์ œ๋“ ์ง€ ๋ง์”€ํ•ด์ฃผ์„ธ์š”. ์ €๋„ ๋‡Œ๋ฅผ ๋†“๊ณ  ๋งŒ๋“ ๊ฑฐ๋ผ ์ž˜ ์ฐพ์•„๋ณด๊ณ  ๋‹ต๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹น.

โœ… Check List

  • ์ฝ”๋“œ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์ปดํŒŒ์ผ๋˜๋‚˜์š”?
  • ํ…Œ์ŠคํŠธ ์ฝ”๋“œ๋ฅผ ํ†ต๊ณผํ–ˆ๋‚˜์š”?
  • mergeํ•  ๋ธŒ๋žœ์น˜์˜ ์œ„์น˜๋ฅผ ํ™•์ธํ–ˆ๋‚˜์š”?
  • Label์„ ์ง€์ •ํ–ˆ๋‚˜์š”?

@lunarbae628 lunarbae628 self-assigned this Oct 22, 2025
@lunarbae628 lunarbae628 added the โœจFeature New feature or request label Oct 22, 2025
Copy link
Collaborator

@ky1nonly ky1nonly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค!

Copy link
Collaborator

@2ternal 2ternal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค
๊ทธ๋Ÿผ ์•ž์œผ๋กœ ๋‚ ๋ฆฌ๊ฒŒ๋  pr์€ dev๊ฐ€ ์•„๋‹ˆ๋ผ staging ๋ธŒ๋žœ์น˜๋กœ ๋‚ ๋ฆฌ๊ฒŒ ๋˜๋‚˜์š”?

@lunarbae628
Copy link
Collaborator Author

lunarbae628 commented Oct 24, 2025

์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค ๊ทธ๋Ÿผ ์•ž์œผ๋กœ ๋‚ ๋ฆฌ๊ฒŒ๋  pr์€ dev๊ฐ€ ์•„๋‹ˆ๋ผ staging ๋ธŒ๋žœ์น˜๋กœ ๋‚ ๋ฆฌ๊ฒŒ ๋˜๋‚˜์š”?

๋„ต ๋งž์Šต๋‹ˆ๋‹ค! staging์—์„œ prํ›„ ๋จธ์ง€๋˜์–ด staging์„œ๋ฒ„์— ๋ฐฐํฌ ํ›„ ๊ฐ์ข… ํ…Œ์ŠคํŠธ์ง„ํ–‰ ํ›„ ๋ฌธ์ œ ์—†์œผ๋ฉด dev์— pr๋‚ ๋ ค ๋จธ์ง€ํ•˜๋ฉด ๋ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!

Copy link
Collaborator

@sleepyhoon sleepyhoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ต‰์žฅํ•ฉ๋‹ˆ๋‹ค ... ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค

@lunarbae628 lunarbae628 merged commit 89dc5b0 into dev Oct 25, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

โœจFeature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants