#!/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"