-
Notifications
You must be signed in to change notification settings - Fork 8
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] feat: 백엔드 CD 작업 Github Actions로 위임 (#629) #630
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 이해한 CD 플로우
github action에서 build -> jar 파일 scp로 ec2에 전송 -> 해당서버에 ssh로 접속 후 배포 스크립트 실행
맞나요?
정확합니다! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이사갑시다.. 2️⃣4️⃣
@@ -16,28 +16,40 @@ jobs: | |||
build: | |||
runs-on: ubuntu-latest | |||
steps: | |||
- name: 리포지토리 체크아웃 | |||
- name: repository checkout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
global 해졌네요
# 2023-11-23 기준 EC2 프리티어 사용으로 인해 DEV 환경을 PROD 환경에서 실행함 | ||
- name: deploy use scp | ||
uses: appleboy/scp-action@master | ||
with: | ||
url: ${{ secrets.JENKINS_URL }} | ||
user: "festago" | ||
token: ${{ secrets.JENKINS_API_TOKEN}} | ||
job: "festago-dev-cd" | ||
host: ${{secrets.FESTAGO_PROD_IP}} | ||
username: ${{secrets.FESTAGO_PROD_USERNAME}} | ||
key: ${{secrets.FESTAGO_SSH_KEY}} | ||
source: "./backend/build/libs/*.jar" | ||
target: ${{ vars.FESTAGO_PROD_JAR_DIR }} | ||
strip_components: 3 | ||
|
||
- name: run application use ssh | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{secrets.FESTAGO_PROD_IP}} | ||
username: ${{secrets.FESTAGO_PROD_USERNAME}} | ||
key: ${{secrets.FESTAGO_SSH_KEY}} | ||
script_stop: true | ||
script: ${{ vars.FESTAGO_DEV_DEPLOY_COMMAND }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
하나의 프리티어 서버에서 port 다르게 dev / prod 띄우면 서버 죽어날까요 ..? 궁금하네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그때 젠킨스 동시에 띄웠을 때 열 받아서 뻗친거 생각하면... 아마 죽지 않을까요..? 메모리가 2기가라서..
📌 관련 이슈