File indexing completed on 2026-04-27 07:41:44
0001
0002
0003 set -euo pipefail
0004
0005 REPO_ROOT=$(cd "$(dirname "$0")/.." && pwd)
0006 TARGET_DIR=/var/www/swf-remote
0007 VENV=$TARGET_DIR/.venv
0008
0009 rsync -av \
0010 --exclude '.venv' --exclude '.git' --exclude '__pycache__' --exclude '*.pyc' --exclude '.env' \
0011 "$REPO_ROOT/" "$TARGET_DIR/"
0012
0013 find "$TARGET_DIR" -path "$TARGET_DIR/.venv" -prune -o -type f -exec chmod o+r {} \; -o -type d -exec chmod o+rx {} \;
0014
0015 "$VENV/bin/python" "$TARGET_DIR/src/manage.py" collectstatic --noinput
0016
0017
0018 touch "$TARGET_DIR/src/swf_remote_project/wsgi_subpath.py"
0019
0020 sudo systemctl reload apache2
0021 echo "Deployment complete. Apache reloaded."