Fix install

This commit is contained in:
CanbiZ 2024-09-13 18:54:37 +02:00 committed by GitHub
parent 01dde0d818
commit ca46dd6c77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 10 deletions

View File

@ -16,11 +16,10 @@ network_check
update_os update_os
msg_info "Installing Dependencies (Patience)" msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y --no-install-recommends \ $STD apt-get install -y \
postgresql \ postgresql \
build-essential \ build-essential \
curl \ curl \
unzip \
sudo \ sudo \
git \ git \
make \ make \
@ -45,16 +44,15 @@ msg_ok "Installed Node.js, pnpm & pm2"
msg_info "Setup Tianji (Patience)" msg_info "Setup Tianji (Patience)"
cd /opt cd /opt
RELEASE=$(wget -q https://github.com/msgbyte/tianji/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) RELEASE=$(curl -s https://api.github.com/repos/msgbyte/tianji/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
wget -q "https://github.com/msgbyte/tianji/archive/refs/tags/${RELEASE}.zip" wget -q "https://github.com/msgbyte/tianji/archive/refs/tags/v${RELEASE}.zip"
unzip -q ${RELEASE}.zip unzip -q v${RELEASE}.zip
CLEAN_RELEASE=$(echo $RELEASE | sed 's/^v//') mv tianji-${RELEASE} /opt/tianji
mv tianji-${CLEAN_RELEASE} /opt/tianji
cd tianji cd tianji
export NODE_OPTIONS=--max_old_space_size=4096 export NODE_OPTIONS=--max_old_space_size=4096
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
$STD pnpm install $STD pnpm install
$STD pnpm build $STD pnpm build
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
msg_ok "Initial Setup complete" msg_ok "Initial Setup complete"
msg_info "Setting up Database" msg_info "Setting up Database"
@ -99,6 +97,6 @@ customize
msg_info "Cleaning up" msg_info "Cleaning up"
rm -R /opt/${RELEASE}.zip rm -R /opt/${RELEASE}.zip
$STD apt-get autoremove $STD apt-get autoremove -y
$STD apt-get autoclean $STD apt-get autoclean -y
msg_ok "Cleaned" msg_ok "Cleaned"