#!/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.216 ./deploy/push.sh # NOTE: target the LAN IP, not void2-app.hynesy.com (that resolves to the # Cloudflare tunnel, which can't carry SSH). CT 311 moved .13 -> .216 on # 2026-06-01 after a post-outage ARP/IP conflict on .13. TARGET=${TARGET:-root@192.168.1.216} 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."