Skip to content

Commit

Permalink
Modify/#398 infra zero down time (#421)
Browse files Browse the repository at this point in the history
* chore: 서브모듈 커밋 시점 변경

* docs: 액츄에이터 의존성 추가

* infra: 무중단 배포를 위한 cd 스크립트 변경

* infra: 테스트와 빌드 하나로 통합

* infra: 스크립트 수정

* infra: 스크립트 수정

* infra: 스크립트 수정

* infra: 스크립트 수정

* infra: 스크립트 수정

* infra: 스크립트 수정

* infra: 스크립트 수정
  • Loading branch information
dwax1324 authored Oct 24, 2024
1 parent 35f0747 commit c79aff8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/Backend-CD-Prod-A.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
echo "No container named 'server' to remove."
fi
sudo docker system prune -f
docker pull ${{ secrets.DOCKER_SERVER_IMAGE }}
docker run -d -p 80:8080 --name server \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/Backend-CD-Prod-B.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- name: Port forwarding begin
run: |
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -I PREROUTING 1 -p tcp --dport 80 -j DNAT --to-destination ${{ secrets.BE_PROD_A_PRIVATE_IP }}:80
sudo iptables -t nat -I POSTROUTING 1 -p tcp --dport 80 -j SNAT --to-source ${{ secrets.BE_PROD_B_PRIVATE_IP }}
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
Expand All @@ -32,6 +33,8 @@ jobs:
echo "No container named 'server' to remove."
fi
sudo docker system prune -f
docker pull ${{ secrets.DOCKER_SERVER_IMAGE }}
docker run -d -p 80:8080 --name server \
Expand Down

0 comments on commit c79aff8

Please sign in to comment.