Fix upgrade script to deploy new files

This commit is contained in:
adminsopel
2026-05-01 10:00:43 +02:00
parent a10547b1dc
commit 077fa00f3e

View File

@@ -2,12 +2,16 @@
set -euo pipefail
source ./_common.sh
systemctl stop "$app" 2>/dev/null || true
app="${YNH_APP_INSTANCE_NAME:-albumik}"
mkdir -p "$install_dir"
rm -rf "$install_dir/backend" "$install_dir/web" "$install_dir/doc"
cp -a backend web doc "$install_dir"/
cp -a "$YNH_APP_BASEDIR/backend" "$YNH_APP_BASEDIR/web" "$YNH_APP_BASEDIR/doc" "$install_dir"/
chown -R "$app:$app" "$install_dir"
systemctl daemon-reload
systemctl start "$app"
systemctl reload nginx || true
echo "Albumik upgraded"
systemctl restart "$app"
nginx -t
systemctl reload nginx