Skip to content

Commit

Permalink
Merge pull request #805 from woowacourse-teams/BE/feature/#781-zero-d…
Browse files Browse the repository at this point in the history
…owntime

[BE] 로컬 IP 주소 변경
  • Loading branch information
reddevilmidzy authored Oct 16, 2024
2 parents 1bd2e9e + 76b9e5a commit f2d2362
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/be_cd-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,17 @@ jobs:
- name: Determine Active and Inactive Ports (Blue/Green)
id: determine-ports
run: |
ip_blue="172.18.0.3"
ip_green="172.18.0.2"
ports=(8080 8081)
ip="127.0.0.1"
ports=(8080 8081)
for port in "${ports[@]}"; do
if [ $port -eq 8080 ]; then
ip=$ip_blue
else
ip=$ip_green
fi
RESPONSE=$(curl -s http://$ip:$port/api/actuator/health)
IS_ACTIVE=$(echo ${RESPONSE} | grep 'UP' | wc -l)
if [ $IS_ACTIVE -eq 1 -a $port -eq "8080" ]; then
Expand Down

0 comments on commit f2d2362

Please sign in to comment.