From 37a6467eed9d05b5a5fc199d96a3c54281bb946c Mon Sep 17 00:00:00 2001 From: dldmsql Date: Sun, 7 Apr 2024 17:19:29 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EC=84=9C=EB=B2=84=20=EC=9D=B4?= =?UTF-8?q?=EC=A0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/health_check.sh | 4 ++-- scripts/switch.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/health_check.sh b/scripts/health_check.sh index 0a7d9f0..56057a7 100644 --- a/scripts/health_check.sh +++ b/scripts/health_check.sh @@ -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" diff --git a/scripts/switch.sh b/scripts/switch.sh index d60b5f6..4ed25ba 100644 --- a/scripts/switch.sh +++ b/scripts/switch.sh @@ -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}."