Files
Void-Homelab/deploy/push-workers.sh
root 2a6f7f88ef feat(workers): systemd unit + push-workers.sh
Deploy README extended with workers bootstrap + note on the void2-db
SQL_ASCII cluster requiring client_encoding=UTF8 on Python clients.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 04:46:58 +10:00

28 lines
616 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Push Python void-workers source to CT 311 and restart the service.
# Run from /project/src/void-v2.
TARGET=${TARGET:-root@192.168.1.13}
REMOTE_DIR=${REMOTE_DIR:-/opt/void-workers}
rsync -avz --delete \
--exclude .venv \
--exclude __pycache__ \
--exclude '*.egg-info' \
--exclude tests \
workers/ "$TARGET:$REMOTE_DIR/"
ssh "$TARGET" "
cd $REMOTE_DIR
if [ ! -d venv ]; then
python3.12 -m venv venv
fi
. venv/bin/activate
pip install --quiet --upgrade pip
pip install --quiet -e '.[all]'
systemctl restart void-workers
"
echo "Workers deployed."