linkwarden: removed unnecessary build step, fixed deploy command postgresql: locked major version, bumpt it from 17 to 18, updated config for compatibility, added sleep to config to make sure Postgres is up aptcacherng: skips overwriting existing service symlink
38 lines
1.4 KiB
Bash
38 lines
1.4 KiB
Bash
#!/bin/sh
|
|
|
|
#Install monolith
|
|
CurmonolithVersion=$(curl -s https://api.github.com/repos/Y2Z/monolith/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " " |tr -d : )
|
|
curl -L -o /opt/monolith-gnu-linux-x86_64 https://github.com/Y2Z/monolith/releases/download/"$CurmonolithVersion"/monolith-gnu-linux-x86_64
|
|
chmod +x /opt/monolith-gnu-linux-x86_64
|
|
echo "$CurmonolithVersion" > /opt/monolith-Version
|
|
ln -s /opt/monolith-gnu-linux-x86_64 /usr/local/bin/monolith
|
|
mv /opt/Setup/Scripts/Update-monolith.sh /opt/Update-monolith.sh
|
|
|
|
#Install linkwarden
|
|
startpath=$(pwd)
|
|
|
|
#Install Linkwarden
|
|
echo $(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " " |tr -d : ) > /opt/linkwarden-Version
|
|
npm install -g yarn
|
|
git clone https://github.com/linkwarden/linkwarden.git /opt/node/linkwarden
|
|
cd /opt/node/linkwarden
|
|
npx playwright install --with-deps chromium
|
|
rm -rf /root/.cache
|
|
|
|
|
|
yarn install
|
|
yarn next telemetry disable
|
|
sudo -u node yarn next telemetry disable
|
|
yarn prisma:generate
|
|
yarn web:build
|
|
yarn cache clean
|
|
npm cache clean --force
|
|
apt clean
|
|
|
|
cd $startpath
|
|
cp /opt/node/linkwarden/.env.sample /opt/node/linkwarden/.env
|
|
chown node: -R /opt/node/linkwarden
|
|
su -c "cd /opt/node/linkwarden; npx playwright install chromium" node
|
|
mv /opt/Setup/Scripts/Update-linkwarden.sh /opt/Update-linkwarden.sh
|
|
|
|
rm -rf /root/.cache |