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

[BE-INFRA] 기존 디비 ec2에 있는 도커를 dev ec2안으로 옮긴다 #351

Merged
merged 9 commits into from
Oct 11, 2024

Conversation

unifolio0
Copy link

🍄 PR 확인 사항

PR이 다음 요구 사항을 충족하는지 확인하세요. :

  • API 명세서가 업데이트 혹은 작성이 되어 있나요?

  • 기존 디비 ec2에 있는 도커를 dev ec2안으로 옮긴다.

기존 코드에서 변경된 점이 있다면 설명해주세요. (추가 X)

@unifolio0 unifolio0 added the BE_INFRA 🚧 백엔드 인프라 label Oct 4, 2024
@unifolio0 unifolio0 added this to the BE 포켓로그 1차 배포 milestone Oct 4, 2024
@unifolio0 unifolio0 self-assigned this Oct 4, 2024
@unifolio0 unifolio0 changed the title [BE-INFRA] 서버별 CD 워크플로우 생성 [BE-INFRA] 기존 디비 ec2에 있는 도커를 dev ec2안으로 옮긴다 Oct 4, 2024
Copy link
Contributor

@jongmee jongmee left a comment

Choose a reason for hiding this comment

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

비토 고생하셨습니다 👍

dev yml 파일을 보니 제가 예전에 달았던 주석도 있는데 제거하면 더 좋을 것 같아요 👍 (이제 db가 로컬호스트로 바뀌었는데 헷갈릴 거 같아서 ㅎㅎ)

docker run -d -p 8080:8080 --name server \
--link pokerogue-mongo-db:mongo \
Copy link
Contributor

Choose a reason for hiding this comment

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

네트워크 연결을 해줬군요 👍 그런데 mongo 라는 별칭을 지정해줘도 잘 돌아가나요? yml 파일을 보니 db url이 pokerogue-mongo-db:27017으로 되어 있어서요!

(잘 돌아가더라도 별칭을 사용하지 않는다면 붙여주지 않아도 되지 않을까요?!)

Copy link
Author

Choose a reason for hiding this comment

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

수정했습니다! ☺️☺️



# Pull and run the MongoDB container
docker pull pokeroguehelper/pokerogue-helper-test-mongodb
Copy link
Contributor

Choose a reason for hiding this comment

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

CI 워크플로우에서 docker image caching으로 문제가 있던 걸로 기억하는데 pull 받기 전에 docker image를 지우는 과정은 필요 없을까요 ?!

Copy link
Author

Choose a reason for hiding this comment

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

수정했습니다! ☺️☺️


# Pull and run the MongoDB container
docker pull pokeroguehelper/pokerogue-helper-test-mongodb
docker run -d --name pokerogue-mongo-db pokeroguehelper/pokerogue-helper-test-mongodb
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ 이미지 이름은 secrets를 활용하는 게 좋을 것 같습니다. public 이미지라 털릴 수 있어서 🥲

Copy link
Author

Choose a reason for hiding this comment

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

수정했습니다! ☺️☺️

@jongmee
Copy link
Contributor

jongmee commented Oct 7, 2024

/noti 비토 리뷰 완!

@unifolio0
Copy link
Author

/noti 미아 리뷰 반영 완!

@@ -56,14 +55,18 @@ jobs:
sudo chmod 666 /var/run/docker.sock

if [ "$(docker ps -qa)" ]; then
docker rm -f $(docker ps -qa)
docker rm -f $(docker ps -qa)
docker builder prune
Copy link
Contributor

Choose a reason for hiding this comment

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

개인 질문인데, docker 이미지를 지우고 다시 이미지를 빌드하는 과정을 CD에 넣으신 이유가 궁금했어요!

왜냐면 CI가 먼저 선행되고 , 거기서 체크 표시가 안떠서 문제가 되는 경우가 많았거든요 🥹
비토의 상황도 비슷했던 것으로 기억합니다!

CI 의 빌드속도가 느려지긴 하겠지만 개인적으로 CD가 느려지기 보다는 CI가 느린게 낫다는 생각이긴 합니다 🤔

근데 개인적인 의견이라서 지금 캠퍼스에 계신 분들끼리 판단해서 정해주셔도 될 것 같아요! 😋

Copy link
Author

@unifolio0 unifolio0 Oct 7, 2024

Choose a reason for hiding this comment

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

저희 CI 돌아가는 ec2랑 CD 돌아가는 ec2가 달라서 해당 로직이 필요할 것 같아요!☺️☺️

Copy link
Contributor

@jinchiim jinchiim left a comment

Choose a reason for hiding this comment

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

이미 미아가 많은 리뷰를 해줬네요! 👍🏻
LGTM 입니다! 비토한테도 도커 배워야겠네요 😄

궁금한거 하나 달았습니다! 확인해주세요!

@jinchiim
Copy link
Contributor

jinchiim commented Oct 7, 2024

/noti 비토 리뷰 한번 확인 부탁!

@unifolio0
Copy link
Author

/noti 폴라 리뷰 답변 완!

Copy link

@dwax1324 dwax1324 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

@dwax1324 dwax1324 left a comment

Choose a reason for hiding this comment

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

비토! 미아 pr보고 궁금한점 코멘트 남겼습니다

.github/workflows/Backend-CD-Dev.yml Outdated Show resolved Hide resolved
.github/workflows/Backend-CD-Dev.yml Show resolved Hide resolved
Copy link

@dwax1324 dwax1324 left a comment

Choose a reason for hiding this comment

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

슛~

@unifolio0 unifolio0 merged commit db8ab5d into be/develop Oct 11, 2024
1 check passed
@unifolio0 unifolio0 deleted the sample-test branch October 11, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE_INFRA 🚧 백엔드 인프라
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants