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 d889fd4 commit 3522098
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ switch_container() {
if ! health_check "$health_check_url"; then
echo "Health check failed, rolling back..."
docker compose -f compose.yml stop "$next_container"
return 1
return
fi

sed -i "s/server $prev_container:8080;/server $next_container:8080;/" "$NGINX_CONFIG_PATH"

echo "Reloading Nginx configuration..."
if ! sudo nginx -s reload; then
echo "Failed to reload Nginx: $(sudo nginx -t 2>&1)"
return 1
return
fi

echo "$next_container is now live and accepting requests!"
Expand Down

0 comments on commit 3522098

Please sign in to comment.