Skip to content

Commit

Permalink
Update rankit-multiaz-cicd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Oodls authored Oct 24, 2024
1 parent 2793c20 commit 61217bc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/rankit-multiaz-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
aws elbv2 deregister-targets \
--target-group-arn ${{ secrets.TARGET_GROUP_ARN }} \
--targets Id=${{ secrets.EC2_A_ID }}
# 4. EC2-A에 Docker 컨테이너 배포
- name: Deploy to EC2-A via SSM
run: |
Expand All @@ -84,7 +84,9 @@ jobs:
--parameters 'commands=[
"if [ $(docker ps -q -f \"ancestor=${{ secrets.DOCKER_USERNAME }}/rankitrun-be:latest\" -f \"status=running\") ]; then docker stop $(docker ps -q -f \"ancestor=${{ secrets.DOCKER_USERNAME }}/rankitrun-be:latest\"); fi",
"docker pull ${{ secrets.DOCKER_USERNAME }}/rankitrun-be:latest",
"docker-compose -f docker-compose.yml up -d"
"docker-compose -f docker-compose.yml up -d",
"sleep 10", # 컨테이너가 시작될 시간을 기다립니다.
"docker-compose -f docker-compose.yml logs"
]' \
--comment "Deploying application to EC2-A"
Expand Down Expand Up @@ -135,7 +137,9 @@ jobs:
--parameters 'commands=[
"if [ $(docker ps -q -f \"ancestor=${{ secrets.DOCKER_USERNAME }}/rankitrun-be:latest\" -f \"status=running\") ]; then docker stop $(docker ps -q -f \"ancestor=${{ secrets.DOCKER_USERNAME }}/rankitrun-be:latest\"); fi",
"docker pull ${{ secrets.DOCKER_USERNAME }}/rankitrun-be:latest",
"docker-compose -f docker-compose.yml up -d"
"docker-compose -f docker-compose.yml up -d",
"sleep 15", # 컨테이너가 시작될 시간을 기다립니다.
"docker-compose -f docker-compose.yml logs"
]' \
--comment "Deploying application to EC2-C"
Expand Down

0 comments on commit 61217bc

Please sign in to comment.