add bun and turbo direct in install.sh, add redis and unzip direct in cloudConfig.yml

This commit is contained in:
einhornimmond 2025-12-05 13:47:26 +01:00
parent 426c8cda70
commit 5eed9b3bc1
2 changed files with 22 additions and 2 deletions

View File

@ -14,6 +14,7 @@ packages:
- git
- mariadb-server
- nginx
- redis
- curl
- build-essential
- gnupg
@ -22,6 +23,7 @@ packages:
- logrotate
- automysqlbackup
- expect
- unzip
package_update: true
package_upgrade: true
write_files:

View File

@ -226,9 +226,27 @@ sudo -u gradido bash <<'EOF'
if ! nvm ls $NODE_VERSION >/dev/null 2>&1; then
nvm install $NODE_VERSION
fi
# Install yarn and pm2
npm i -g yarn pm2
BUN_VERSION_FILE="$PROJECT_ROOT/.bun-version"
if [ ! -f "$BUN_VERSION_FILE" ]; then
echo ".bun-version file not found at: $BUN_VERSION_FILE"
exit 1
fi
BUN_VERSION="$(cat "$BUN_VERSION_FILE" | tr -d '[:space:]')"
echo "'bun' v$BUN_VERSION will be installed now!"
curl -fsSL https://bun.com/install | bash -s "bun-v${BUN_VERSION}"
# Load bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# Install pm2 and turbo
bun add -g pm2 turbo
EOF
# Load bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# Load nvm
export NVM_DIR="/home/gradido/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"