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.
This commit is contained in:
@@ -47,9 +47,9 @@ function update_script() {
|
|||||||
|
|
||||||
msg_info "Updating Application"
|
msg_info "Updating Application"
|
||||||
cd /opt/blinko
|
cd /opt/blinko
|
||||||
$STD npm install
|
$STD bun install
|
||||||
$STD npx prisma migrate deploy
|
$STD bunx prisma migrate deploy
|
||||||
$STD npm run build
|
$STD bun run build
|
||||||
msg_ok "Updated Application"
|
msg_ok "Updated Application"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
|
|||||||
@@ -14,6 +14,14 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
NODE_VERSION="22" setup_nodejs
|
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_VERSION="16" setup_postgresql
|
||||||
PG_DB_NAME="blinko" PG_DB_USER="blinko" setup_postgresql_db
|
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_URL=http://${LOCAL_IP}:1111
|
||||||
NEXTAUTH_SECRET=$(openssl rand -base64 32)
|
NEXTAUTH_SECRET=$(openssl rand -base64 32)
|
||||||
EOF
|
EOF
|
||||||
$STD npm install
|
$STD bun install
|
||||||
$STD npx prisma generate
|
$STD bunx prisma generate
|
||||||
$STD npx prisma migrate deploy
|
$STD bunx prisma migrate deploy
|
||||||
$STD npm run build
|
$STD bun run build
|
||||||
msg_ok "Set up ${APP}"
|
msg_ok "Set up ${APP}"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|||||||
Reference in New Issue
Block a user