Skip to content

Commit

Permalink
chore: 서버 이전
Browse files Browse the repository at this point in the history
  • Loading branch information
dldmsql committed Apr 7, 2024
1 parent 1611624 commit 37a6467
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/health_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ else
fi


echo "> Start health check of WAS at 'http://15.164.225.117:${TARGET_PORT}' ..."
echo "> Start health check of WAS at 'http://127.0.0.1:${TARGET_PORT}' ..."

for RETRY_COUNT in 1 2 3 4 5 6 7 8 9 10
do
echo "> #${RETRY_COUNT} trying..."
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://13.209.202.74:${TARGET_PORT}/api)
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:${TARGET_PORT}/api)

if [ ${RESPONSE_CODE} -eq 200 ]; then
echo "> New WAS successfully running"
Expand Down
4 changes: 2 additions & 2 deletions scripts/switch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ else
fi

# Change proxying port into target port
echo "set \$service_url http://15.164.225.117:${TARGET_PORT};" | tee /home/ec2-user/service_url.inc
echo "set \$service_admin_url http://15.164.225.117:${TARGET_PORT}/admin;" | tee /home/ec2-user/service_admin_url.inc
echo "set \$service_url http://127.0.0.1:${TARGET_PORT};" | sudo tee /home/ec2-user/service_url.inc
echo "set \$service_admin_url http://127.0.0.1:${TARGET_PORT}/admin;" | sudo tee /home/ec2-user/service_admin_url.inc

echo "> Now Nginx proxies to ${TARGET_PORT}."

Expand Down

0 comments on commit 37a6467

Please sign in to comment.