Skip to content

Commit

Permalink
refactor: 배포 스크립트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
alstn113 committed Jan 8, 2025
1 parent 8bc4386 commit 0fd61fb
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions server/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,6 @@ health_check() {

sleep 20

echo "a"
curl "http://localhost:8082/actuator/health"

echo "b"
curl "http://localhost:8083/actuator/health"

echo "c"
curl http://app-blue:8082/actuator/health

echo "d"
curl http://app-green:8083/actuator/health

echo "e"
curl http://127.0.0.1:8082/actuator/health

echo "f"
curl http://127.0.0.1:8083/actuator/health

echo "g"
curl http://localhost:8080/actuator/health

for i in $(seq 1 $HEALTH_CHECK_ATTEMPTS); do
echo "Health check attempt ($i/$HEALTH_CHECK_ATTEMPTS) for $target_url"
response=$(curl -s -o /dev/null -w "%{http_code}" "$target_url")
Expand Down Expand Up @@ -66,7 +45,7 @@ switch_container() {

if ! health_check "$health_check_url"; then
echo "Health check failed, rolling back..."
# docker compose -f compose.yml down "$next_container"
docker compose -f compose.yml down "$next_container"
return
fi

Expand Down

0 comments on commit 0fd61fb

Please sign in to comment.