chore(deploy): systemd unit, push.sh, one-time setup notes

This commit is contained in:
root
2026-05-31 15:32:09 +10:00
parent 692f300af5
commit b5e7478158
3 changed files with 93 additions and 0 deletions

22
deploy/push.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail
# Push dev source to void2-app (CT 311) and restart the service.
# Run from /project/src/void-v2.
#
# Override TARGET / REMOTE_DIR via env if needed:
# TARGET=root@192.168.1.16 ./deploy/push.sh
TARGET=${TARGET:-root@void2-app}
REMOTE_DIR=${REMOTE_DIR:-/opt/void-server}
rsync -avz --delete \
--exclude node_modules \
--exclude .git \
--exclude tests \
--exclude coverage \
--exclude .env \
./ "$TARGET:$REMOTE_DIR/"
ssh "$TARGET" "cd $REMOTE_DIR && npm install --omit=dev && systemctl restart void-server"
echo "Deployed."