nkbmusic/server/update.sh
metatroncubeswdev 7b4239544c Add server update script and git-based update instructions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 10:40:10 -04:00

19 lines
548 B
Bash

#!/bin/sh
# Pull the latest code from git and redeploy the backend (new migrations,
# config, email templates). Secrets and data are kept.
#
# sh ~/APPS/nanga_kathai/server/update.sh
#
# Settings below match the HestiaCP server; override with env vars if needed.
set -eu
HERE="$(cd "$(dirname "$0")" && pwd)"
DOMAIN="${NK_DOMAIN:-app.nkbmusic.com}"
export NK_DIR="${NK_DIR:-$HOME/APPS/nk-backend}"
echo "==> Pulling the latest code"
git -C "$HERE/.." pull --ff-only
git -C "$HERE/.." log --oneline -1
sh "$HERE/deploy.sh" "$DOMAIN" </dev/null