move venv to .venv

This commit is contained in:
Mateusz Gruszczyński
2026-06-15 08:14:04 +02:00
parent b710f6e6f9
commit aa87ced07b
8 changed files with 29 additions and 27 deletions
@@ -44,15 +44,16 @@ mkdir -p "${APP_DIR}"
rsync -a --delete \
--exclude '.git' \
--exclude 'venv' \
--exclude '.venv' \
--exclude '__pycache__' \
--exclude '*.pyc' \
./ "${APP_DIR}/"
cd "${APP_DIR}"
"${PYTHON_BIN}" -m venv venv
venv/bin/pip install --upgrade pip wheel
venv/bin/pip install -r requirements.txt
"${PYTHON_BIN}" -m venv .venv
.venv/bin/pip install --upgrade pip wheel
.venv/bin/pip install -r requirements.txt
mkdir -p data instance logs data/logs
chown -R "${APP_USER}:${APP_USER}" "${APP_DIR}" "/var/lib/${APP_USER}"
@@ -95,7 +96,7 @@ chown -R "${APP_USER}:${APP_USER}" "${PYTORRENT_LOG_DIR_VALUE}" || true
chown "${APP_USER}:${APP_USER}" .env
if [[ -f scripts/download_frontend_libs.py ]]; then
sudo -u "${APP_USER}" "${APP_DIR}/venv/bin/python" scripts/download_frontend_libs.py || true
sudo -u "${APP_USER}" "${APP_DIR}/.venv/bin/python" scripts/download_frontend_libs.py || true
fi
if [[ -f scripts/download_geoip.sh ]]; then
@@ -115,7 +116,7 @@ Group=${APP_USER}
WorkingDirectory=${APP_DIR}
Environment="PYTHONUNBUFFERED=1"
EnvironmentFile=${APP_DIR}/.env
ExecStart=${APP_DIR}/venv/bin/gunicorn -c ${APP_DIR}/gunicorn.conf.py --worker-class gthread --workers 1 --threads 32 --bind \${PYTORRENT_HOST}:\${PYTORRENT_PORT} --access-logfile - --error-logfile - wsgi:app
ExecStart=${APP_DIR}/.venv/bin/gunicorn -c ${APP_DIR}/gunicorn.conf.py --worker-class gthread --workers 1 --threads 32 --bind \${PYTORRENT_HOST}:\${PYTORRENT_PORT} --access-logfile - --error-logfile - wsgi:app
Restart=always
RestartSec=3
KillSignal=SIGINT
@@ -233,7 +233,7 @@ fi
bash "${PROJECT_DIR}/scripts/install_pytorrent_only.sh" "${PYTORRENT_ONLY_ARGS[@]}"
if [[ -n "${PYTORRENT_API_TOKEN}" ]]; then
"${PYTORRENT_APP_DIR}/venv/bin/python" "${PYTORRENT_APP_DIR}/scripts/stack_installers/configure_pytorrent_api.py" \
"${PYTORRENT_APP_DIR}/.venv/bin/python" "${PYTORRENT_APP_DIR}/scripts/stack_installers/configure_pytorrent_api.py" \
--base-url "${PYTORRENT_BASE_URL}" \
--profile-name "${PYTORRENT_PROFILE_NAME}" \
--scgi-url "${PYTORRENT_RTORRENT_SCGI_URL}" \