From 0dbf0b06ae11aa141b0e3229b1c6d8319bbc3fb3 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 13 Apr 2026 16:32:47 +0200 Subject: [PATCH] Switch to Bun runtime and update install scripts Install Bun during setup and replace npm/npx calls with bun/bunx. Added Bun install (sets BUN_INSTALL, runs bun install script, and symlinks bun and bunx to /usr/local/bin) in install/blinko-install.sh. Updated ct/blinko.sh and install/blinko-install.sh to use `bun install`, `bunx prisma ...`, and `bun run build` instead of npm/npx commands for dependency install, Prisma generate/migrate, and build steps. --- ct/blinko.sh | 6 +++--- install/blinko-install.sh | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ct/blinko.sh b/ct/blinko.sh index 260acf38..65a49a47 100644 --- a/ct/blinko.sh +++ b/ct/blinko.sh @@ -47,9 +47,9 @@ function update_script() { msg_info "Updating Application" cd /opt/blinko - $STD npm install - $STD npx prisma migrate deploy - $STD npm run build + $STD bun install + $STD bunx prisma migrate deploy + $STD bun run build msg_ok "Updated Application" msg_info "Starting Service" diff --git a/install/blinko-install.sh b/install/blinko-install.sh index 4c4e1a04..f75ee5d9 100644 --- a/install/blinko-install.sh +++ b/install/blinko-install.sh @@ -14,6 +14,14 @@ network_check update_os NODE_VERSION="22" setup_nodejs + +msg_info "Installing Bun" +export BUN_INSTALL="/root/.bun" +curl -fsSL https://bun.sh/install | $STD bash +ln -sf /root/.bun/bin/bun /usr/local/bin/bun +ln -sf /root/.bun/bin/bunx /usr/local/bin/bunx +msg_ok "Installed Bun" + PG_VERSION="16" setup_postgresql PG_DB_NAME="blinko" PG_DB_USER="blinko" setup_postgresql_db @@ -28,10 +36,10 @@ NEXT_PUBLIC_BASE_URL=http://${LOCAL_IP}:1111 NEXTAUTH_URL=http://${LOCAL_IP}:1111 NEXTAUTH_SECRET=$(openssl rand -base64 32) EOF -$STD npm install -$STD npx prisma generate -$STD npx prisma migrate deploy -$STD npm run build +$STD bun install +$STD bunx prisma generate +$STD bunx prisma migrate deploy +$STD bun run build msg_ok "Set up ${APP}" msg_info "Creating Service"