Skip to content
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

Feat/#145 #161

Merged
merged 38 commits into from
May 4, 2024
Merged

Feat/#145 #161

merged 38 commits into from
May 4, 2024

Conversation

sgh002400
Copy link
Contributor

@sgh002400 sgh002400 commented Apr 11, 2024

๐Ÿ‘ฉโ€๐Ÿ’ป Contents

Github Action, Elastic Beanstalk์„ ํ™œ์šฉํ•œ CI/CD ํ™˜๊ฒฝ ๊ตฌ์ถ• -> ๋น„์šฉ ๋ฌธ์ œ๋กœ Github Action, DockerHub์™€ Docker & Shell Script๋ฅผ ํ™œ์šฉํ•œ CI/CD ๋ฐฉ์‹์œผ๋กœ ๋ณ€๊ฒฝ

๐Ÿ“ Review Note

[๋ฐฐํฌ ๋ฐฉ์‹]

  • spring ์„œ๋ฒ„ ๊ธฐ๋™์— ํ•„์š”ํ•œ secret ๊ฐ’๋“ค์€ github secret์— ์ €์žฅํ•˜์—ฌ cd ๊ณผ์ •์—์„œ ๊ทธ ๊ฐ’์„ ์ฝ์–ด์„œ ๊ธฐ์กด ๊ฒฝ๋กœ์— ํŒŒ์ผ๋กœ ๋งŒ๋“ค์–ด์ค€ ๋’ค ์ด๋ฏธ์ง€๋ฅผ ๋งŒ๋“ ๋‹ค.
    • ๋ณ€๊ฒฝ ๋˜๋Š” ์ถ”๊ฐ€ ์‹œ github secret์— ์ˆ˜์ • ํ•„์š”!
  • nestjs ์„œ๋ฒ„ ๊ธฐ๋™์— ํ•„์š”ํ•œ secret ๊ฐ’๋“ค์€ ์ธ์Šคํ„ด์Šค์— .env ํŒŒ์ผ์— ์ €์žฅํ•˜์˜€์œผ๋ฉฐ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰ํ•  ๋•Œ ์ฃผ์ž…ํ•œ๋‹ค.
    • ๋ณ€๊ฒฝ ๋˜๋Š” ์ถ”๊ฐ€ ์‹œ docker-compose.yml ๋ฐ ์ธ์Šคํ„ด์Šค /docker/.env ํŒŒ์ผ ์ˆ˜์ • ํ•„์š”!
  • dev, main ๋ธŒ๋žœ์น˜์— push ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด cd.yml์— ์ •์˜๋˜์–ด ์žˆ๋Š” ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•œ๋‹ค.

๐Ÿ“ฃ Related Issue

Copy link

height bot commented Apr 11, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

๐Ÿ’กTip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@sgh002400 sgh002400 requested a review from mikekks April 11, 2024 14:16
@sgh002400 sgh002400 self-assigned this Apr 11, 2024
@sgh002400 sgh002400 marked this pull request as ready for review May 1, 2024 07:47
Copy link
Member

@mikekks mikekks left a comment

Choose a reason for hiding this comment

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

์ •๋ง ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค!!! ๊ตฟ๊ตฟ!!!!!

Comment on lines +17 to +19
- [ ] docker-compose.yml ํŒŒ์ผ์— ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ํ•œ API์˜ ํฌ์›Œ๋”ฉ์„ ๋ณ€๊ฒฝํ•ด์คฌ๋‚˜์š”?
- [ ] Spring Secret ๊ฐ’์„ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์ถ”๊ฐ€ํ–ˆ๋‹ค๋ฉด Github Secret์—์„œ ์ˆ˜์ •์„ ํ•ด์คฌ๋‚˜์š”?
- [ ] Nestjs Secret ๊ฐ’์„ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์ถ”๊ฐ€ํ–ˆ๋‹ค๋ฉด Docker-Compose.yml ํŒŒ์ผ ๋ฐ ์ธ์Šคํ„ด์Šค ๋‚ด๋ถ€์˜ .env ํŒŒ์ผ์„ ์ˆ˜์ •ํ–ˆ๋‚˜์š”?
Copy link
Member

Choose a reason for hiding this comment

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

์˜คํ˜ธ ์ด๊ฑฐ ์ข‹๋„ค์š”!

Comment on lines +1 to +16
#!/bin/bash
export $(grep -v '^#' docker/.env | sed 's/ *= */=/g' | xargs)

IS_GREEN_EXIST=$(sudo docker ps | grep green)
DIR=~/docker

SPRING_GREEN_PORT=4001
SPRING_BLUE_PORT=4002
NESTJS_GREEN_PORT=3001
NESTJS_BLUE_PORT=3002
DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD

SPRING_GREEN_NAME="spring-green"
SPRING_BLUE_NAME="spring-blue"
NESTJS_GREEN_NAME="nestjs-green"
NESTJS_BLUE_NAME="nestjs-blue"
Copy link
Member

Choose a reason for hiding this comment

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

ํ•ด๋‹น ํŒŒ์ผ์€ ์‹ค์ œ ๋™์ž‘์—์„œ๋Š” ์‚ฌ์šฉํ•˜์ง€ ์•Š์€ ํŒŒ์ผ ๋งž์„๊นŒ์š”?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ํ…Œ์ŠคํŠธ๋Š” deploy.sh๋กœ ์ง„ํ–‰ํ•˜๋‹ค๊ฐ€ ์ปจํ…Œ์ด๋„ˆ๋“ค์„ ์‹คํ–‰ํ•  ๋•Œ ์šด์˜๊ณผ ๊ฐœ๋ฐœ ์„œ๋ฒ„์˜ ๋ช…๋ น์–ด ์ฐจ์ด๊ฐ€ ์žˆ์–ด์„œ ๋ถ„๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค~

Copy link
Member

@mikekks mikekks May 2, 2024

Choose a reason for hiding this comment

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

์•„ ๊ทธ๋ ‡๊ตฐ์š”!
๊ทธ๋Ÿฌ๋ฉด ํ•ด๋‹น ํŒŒ์ผ์€ ec2๋‚ด์— ์ž๋™์œผ๋กœ ์ฃผ์ž…๋˜๋Š” ํŒŒ์ผ์€ ์•„๋‹Œ๊ฑฐ์ฃ ?? ๋งŒ์•ฝ ec2๋‚ด์— ํ•ด๋‹น ํŒŒ์ผ์ด ์—†๋‹ค๋ฉด ์ˆ˜๋™์œผ๋กœ ํ•ด๋‹น ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์•ผ ํ•˜๋Š”๊ฑฐ์ฃ ?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

๋งž์Šต๋‹ˆ๋‹ค~

@sgh002400 sgh002400 merged commit 3919b8b into develop May 4, 2024
2 checks passed
@mikekks mikekks deleted the feat/#145 branch August 4, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants