refactor: update Excalidash installation and configuration paths

This commit is contained in:
MickLesk
2026-05-27 15:58:02 +02:00
parent 3c1c05178e
commit 238d375dfa
3 changed files with 32 additions and 24 deletions

View File

@@ -35,13 +35,10 @@ function update_script() {
systemctl stop excalidash
msg_ok "Stopped Service"
msg_info "Backing up Data"
cp /opt/excalidash/backend/.env /opt/excalidash.env.bak
cp /opt/excalidash/backend/prisma/database.db /opt/excalidash.db.bak 2>/dev/null || true
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "excalidash" "ZimengXiong/ExcaliDash" "tarball"
ln -sf /opt/excalidash_data/.env /opt/excalidash/backend/.env
msg_info "Rebuilding Application"
cd /opt/excalidash/backend
$STD npm ci
@@ -53,15 +50,9 @@ function update_script() {
cp -r /opt/excalidash/frontend/dist/. /var/www/excalidash/
msg_ok "Rebuilt Application"
msg_info "Restoring Data"
cp /opt/excalidash.env.bak /opt/excalidash/backend/.env
cp /opt/excalidash.db.bak /opt/excalidash/backend/prisma/database.db 2>/dev/null || true
rm -f /opt/excalidash.env.bak /opt/excalidash.db.bak
msg_ok "Restored Data"
msg_info "Running Migrations"
cd /opt/excalidash/backend
set -a && source /opt/excalidash/backend/.env && set +a
set -a && source /opt/excalidash_data/.env && set +a
$STD npx prisma migrate deploy
msg_ok "Ran Migrations"