deploy.sh 639 B

12345678910
  1. #!/usr/bin/env bash
  2. # Deploy the repo's server/ folder to the LYNX SHARE VPS and run setup.sh there (idempotent).
  3. # server/deploy.sh [ssh-host] default host: lynx-vps (alias in ~/.ssh/config)
  4. # Then: python3 server/tests/smoke.py (end-to-end check against the live URLs)
  5. set -euo pipefail
  6. HOST=${1:-lynx-vps}
  7. cd "$(dirname "$0")"
  8. tar --create --gzip --exclude='__pycache__' --exclude='*.pyc' --exclude='*.env' . \
  9. | ssh "$HOST" 'set -e; rm -rf /opt/lynx/src.new; mkdir -p /opt/lynx/src.new; tar -xzf - -C /opt/lynx/src.new;
  10. rm -rf /opt/lynx/src; mv /opt/lynx/src.new /opt/lynx/src; bash /opt/lynx/src/setup.sh'