harmonize .venv

This commit is contained in:
CanbiZ 2025-06-04 13:52:34 +02:00
parent 201d2ae93e
commit 591c37cbac
11 changed files with 32 additions and 27 deletions

View File

@ -22,7 +22,7 @@ $STD unzip bazarr -d /opt/bazarr
chmod 775 /opt/bazarr /var/lib/bazarr/ chmod 775 /opt/bazarr /var/lib/bazarr/
cd /opt/bazarr cd /opt/bazarr
$STD uv venv /opt/bazarr/.venv $STD uv venv /opt/bazarr/.venv
$STD uv pip install -r requirements.txt $STD /opt/bazarr/.venv/bin/python -m pip install -r requirements.txt
msg_ok "Installed Bazarr" msg_ok "Installed Bazarr"
msg_info "Creating Service" msg_info "Creating Service"

View File

@ -21,6 +21,7 @@ PYTHON_VERSION="3.12" setup_uv
msg_info "Installing Deluge" msg_info "Installing Deluge"
mkdir -p /opt/deluge mkdir -p /opt/deluge
cd /opt/deluge
$STD uv venv /opt/deluge/.venv $STD uv venv /opt/deluge/.venv
$STD uv pip install deluge[all] $STD uv pip install deluge[all]
msg_ok "Installed Deluge" msg_ok "Installed Deluge"

View File

@ -55,7 +55,7 @@ $STD unzip v${RELEASE}.zip
mv documenso-${RELEASE} /opt/documenso mv documenso-${RELEASE} /opt/documenso
cd /opt/documenso cd /opt/documenso
$STD uv venv /opt/documenso/.venv $STD uv venv /opt/documenso/.venv
$STD /opt/documenso/.venv/bin/uv pip install bcrypt $STD uv pip install bcrypt
mv .env.example /opt/documenso/.env mv .env.example /opt/documenso/.env
sed -i \ sed -i \
-e "s|^NEXTAUTH_SECRET=.*|NEXTAUTH_SECRET='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \ -e "s|^NEXTAUTH_SECRET=.*|NEXTAUTH_SECRET='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \

View File

@ -22,7 +22,7 @@ PYTHON_VERSION="3.12" setup_uv
msg_info "Setting up Virtual Environment" msg_info "Setting up Virtual Environment"
mkdir -p /opt/esphome mkdir -p /opt/esphome
$STD uv venv /opt/esphome/.venv $STD uv venv /opt/esphome/.venv
$STD /opt/esphome/.venv/bin/uv pip install esphome tornado esptool $STD uv pip install esphome tornado esptool
msg_ok "Setup and Installed ESPHome" msg_ok "Setup and Installed ESPHome"
msg_info "Creating Service" msg_info "Creating Service"

View File

@ -31,8 +31,8 @@ curl -fsSL "https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolm
$STD unzip spoolman.zip -d spoolman $STD unzip spoolman.zip -d spoolman
rm -f spoolman.zip rm -f spoolman.zip
cd spoolman cd spoolman
$STD uv venv /opt/spoolman/venv $STD uv venv /opt/spoolman/.venv
$STD /opt/spoolman/venv/bin/uv pip install -r requirements.txt $STD uv pip install -r requirements.txt
curl -fsSL "https://raw.githubusercontent.com/Donkie/Spoolman/master/.env.example" -o ".env" curl -fsSL "https://raw.githubusercontent.com/Donkie/Spoolman/master/.env.example" -o ".env"
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Spoolman" msg_ok "Installed Spoolman"
@ -47,7 +47,7 @@ After=network.target
Type=simple Type=simple
WorkingDirectory=/opt/spoolman WorkingDirectory=/opt/spoolman
EnvironmentFile=/opt/spoolman/.env EnvironmentFile=/opt/spoolman/.env
ExecStart=/opt/spoolman/venv/bin/uvicorn spoolman.main:app --host 0.0.0.0 --port 7912 ExecStart=/opt/spoolman/.venv/bin/uvicorn spoolman.main:app --host 0.0.0.0 --port 7912
Restart=always Restart=always
User=root User=root

View File

@ -14,9 +14,7 @@ setting_up_container
network_check network_check
update_os update_os
NODE_VERSION="22" NODE_VERSION="22" NODE_MODULE="npm@latest,yarn@latest" install_node_and_modules
NODE_MODULE="npm@latest,yarn@latest"
install_node_and_modules
setup_uv setup_uv
fetch_and_deploy_gh_release "CrazyWolf13/streamlink-webui" fetch_and_deploy_gh_release "CrazyWolf13/streamlink-webui"

View File

@ -38,8 +38,9 @@ NODE_VERSION="20" NODE_MODULE="yarn@latest" install_node_and_modules
msg_info "Installing Tandoor (Patience)" msg_info "Installing Tandoor (Patience)"
$STD git clone https://github.com/TandoorRecipes/recipes -b master /opt/tandoor $STD git clone https://github.com/TandoorRecipes/recipes -b master /opt/tandoor
mkdir -p /opt/tandoor/{config,api,mediafiles,staticfiles} mkdir -p /opt/tandoor/{config,api,mediafiles,staticfiles}
$STD uv venv /opt/tandoor/venv cd /opt/tandoor
$STD /opt/tandoor/venv/bin/uv pip install -r /opt/tandoor/requirements.txt $STD uv venv /opt/tandoor/.venv
$STD uv pip install -r requirements.txt
cd /opt/tandoor/vue cd /opt/tandoor/vue
$STD yarn install $STD yarn install
@ -59,7 +60,7 @@ sed -i -e "s|SECRET_KEY=.*|SECRET_KEY=$secret_key|g" \
-e "s|POSTGRES_USER=.*|POSTGRES_USER=$DB_USER|g" \ -e "s|POSTGRES_USER=.*|POSTGRES_USER=$DB_USER|g" \
-e "\$a\STATIC_URL=/staticfiles/" /opt/tandoor/.env -e "\$a\STATIC_URL=/staticfiles/" /opt/tandoor/.env
cd /opt/tandoor cd /opt/tandoor
$STD /opt/tandoor/venv/bin/uv run python version.py $STD uv run python version.py
msg_ok "Installed Tandoor" msg_ok "Installed Tandoor"
msg_info "Install/Set up PostgreSQL Database" msg_info "Install/Set up PostgreSQL Database"
@ -77,9 +78,9 @@ echo -e "Tandoor Database Name: \e[32m$DB_NAME\e[0m" >>~/tandoor.creds
echo -e "Tandoor Database User: \e[32m$DB_USER\e[0m" >>~/tandoor.creds echo -e "Tandoor Database User: \e[32m$DB_USER\e[0m" >>~/tandoor.creds
echo -e "Tandoor Database Password: \e[32m$DB_PASS\e[0m" >>~/tandoor.creds echo -e "Tandoor Database Password: \e[32m$DB_PASS\e[0m" >>~/tandoor.creds
export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs) export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs)
$STD /opt/tandoor/venv/bin/uv run python manage.py migrate $STD uv run python manage.py migrate
$STD /opt/tandoor/venv/bin/uv run python manage.py collectstatic --no-input $STD uv run python manage.py collectstatic --no-input
$STD /opt/tandoor/venv/bin/uv run python manage.py collectstatic_js_reverse $STD uv run python manage.py collectstatic_js_reverse
msg_ok "Set up PostgreSQL Database" msg_ok "Set up PostgreSQL Database"
msg_info "Creating Services" msg_info "Creating Services"
@ -94,7 +95,7 @@ Restart=always
RestartSec=3 RestartSec=3
WorkingDirectory=/opt/tandoor WorkingDirectory=/opt/tandoor
EnvironmentFile=/opt/tandoor/.env EnvironmentFile=/opt/tandoor/.env
ExecStart=/opt/tandoor/venv/bin/gunicorn --error-logfile /tmp/gunicorn_err.log --log-level debug --capture-output --bind unix:/opt/tandoor/tandoor.sock recipes.wsgi:application ExecStart=/opt/tandoor/.venv/bin/gunicorn --error-logfile /tmp/gunicorn_err.log --log-level debug --capture-output --bind unix:/opt/tandoor/tandoor.sock recipes.wsgi:application
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -21,8 +21,10 @@ PYTHON_VERSION="3.12" setup_uv
NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules
msg_info "Setup Platformio" msg_info "Setup Platformio"
uv venv /opt/tasmocompiler/venv mkdir -p /opt/tasmocompiler
$STD /opt/tasmocompiler/venv/bin/uv pip install platformio cd /opt/tasmocompiler
$STD uv venv /opt/tasmocompiler/.venv
$STD uv pip install platformio
msg_ok "Setup Platformio" msg_ok "Setup Platformio"
msg_info "Setup TasmoCompiler" msg_info "Setup TasmoCompiler"

View File

@ -22,9 +22,10 @@ PYTHON_VERSION="3.12" setup_uv
msg_info "Installing Tautulli" msg_info "Installing Tautulli"
cd /opt cd /opt
$STD git clone https://github.com/Tautulli/Tautulli.git $STD git clone https://github.com/Tautulli/Tautulli.git
$STD uv venv /opt/Tautulli/venv cd /opt/Tautulli
$STD /opt/Tautulli/venv/bin/uv pip install -r /opt/Tautulli/requirements.txt $STD uv venv /opt/Tautulli/.venv
$STD /opt/Tautulli/venv/bin/uv pip install pyopenssl $STD uv pip install -r /opt/Tautulli/requirements.txt
$STD uv pip install pyopenssl
msg_ok "Installed Tautulli" msg_ok "Installed Tautulli"
msg_info "Creating Service" msg_info "Creating Service"
@ -38,7 +39,7 @@ WorkingDirectory=/opt/Tautulli/
Restart=on-failure Restart=on-failure
RestartSec=5 RestartSec=5
Type=simple Type=simple
ExecStart=/opt/Tautulli/venv/bin/python /opt/Tautulli/Tautulli.py ExecStart=/opt/Tautulli/.venv/bin/python /opt/Tautulli/Tautulli.py
KillSignal=SIGINT KillSignal=SIGINT
TimeoutStopSec=20 TimeoutStopSec=20
SyslogIdentifier=tautulli SyslogIdentifier=tautulli

View File

@ -34,8 +34,10 @@ if [[ "$CTTYPE" == "0" ]]; then
fi fi
msg_info "Installing Unmanic" msg_info "Installing Unmanic"
uv venv /opt/unmanic/venv mkdir -p /opt/unmanic
/opt/unmanic/venv/bin/uv pip install unmanic cd /opt/unmanic
$STD uv venv /opt/unmanic/.venv
$STD uv pip install unmanic
sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group
msg_ok "Installed Unmanic" msg_ok "Installed Unmanic"
@ -49,7 +51,7 @@ StartLimitBurst=3
[Service] [Service]
Type=simple Type=simple
ExecStart=/opt/unmanic/venv/bin/unmanic ExecStart=/opt/unmanic/.venv/bin/unmanic
Restart=always Restart=always
RestartSec=30 RestartSec=30

View File

@ -39,8 +39,8 @@ tar xzf $RELEASE.tar.gz
mv wger-$RELEASE /home/wger/src mv wger-$RELEASE /home/wger/src
cd /home/wger/src cd /home/wger/src
$STD uv venv /home/wger/.venv $STD uv venv /home/wger/.venv
$STD /home/wger/.venv/bin/uv pip install -r requirements_prod.txt $STD uv pip install -r requirements_prod.txt
$STD /home/wger/.venv/bin/uv pip install -e . $STD uv pip install -e .
$STD /home/wger/.venv/bin/wger create-settings --database-path /home/wger/db/database.sqlite $STD /home/wger/.venv/bin/wger create-settings --database-path /home/wger/db/database.sqlite
sed -i "s#home/wger/src/media#home/wger/media#g" /home/wger/src/settings.py sed -i "s#home/wger/src/media#home/wger/media#g" /home/wger/src/settings.py
sed -i "/MEDIA_ROOT = '\/home\/wger\/media'/a STATIC_ROOT = '/home/wger/static'" /home/wger/src/settings.py sed -i "/MEDIA_ROOT = '\/home\/wger\/media'/a STATIC_ROOT = '/home/wger/static'" /home/wger/src/settings.py