Bookstack

This commit is contained in:
Michel Roegl-Brunner 2025-05-07 16:01:05 +02:00
parent 1ad7b1ae8c
commit 550ee492db
2 changed files with 2 additions and 8 deletions

View File

@ -35,9 +35,7 @@ function update_script() {
msg_info "Updating ${APP} to v${RELEASE}"
mv /opt/bookstack /opt/bookstack-backup
curl -fsSL "https://github.com/BookStackApp/BookStack/archive/refs/tags/v${RELEASE}.zip" -o "/opt/BookStack-${RELEASE}.zip"
unzip -q "/opt/BookStack-${RELEASE}.zip" -d /opt
mv "/opt/BookStack-${RELEASE}" /opt/bookstack
fetch_and_deploy_gh_release BookstackApp/BookStack
cp /opt/bookstack-backup/.env /opt/bookstack/.env
cp -r /opt/bookstack-backup/public/uploads/* /opt/bookstack/public/uploads/ || true
cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/ || true

View File

@ -42,11 +42,7 @@ msg_ok "Set up database"
msg_info "Setup Bookstack (Patience)"
LOCAL_IP="$(hostname -I | awk '{print $1}')"
cd /opt
RELEASE=$(curl -fsSL https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
RELEASE="25.02.2"
curl -fsSL "https://github.com/BookStackApp/BookStack/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/BookStackApp/BookStack/archive/refs/tags/v${RELEASE}.zip")
unzip -q v${RELEASE}.zip
mv BookStack-${RELEASE} /opt/bookstack
fetch_and_deploy_gh_release BookstackApp/BookStack
cd /opt/bookstack
cp .env.example .env
sudo sed -i "s|APP_URL=.*|APP_URL=http://$LOCAL_IP|g" /opt/bookstack/.env