more uv migs

This commit is contained in:
CanbiZ 2025-06-04 08:28:27 +02:00
parent 594dc3c9d5
commit 3b1a17c5a3
3 changed files with 17 additions and 28 deletions

View File

@ -19,11 +19,10 @@ $STD apt-get install -y \
uwsgi-plugin-python3 \ uwsgi-plugin-python3 \
libopenjp2-7-dev \ libopenjp2-7-dev \
libpq-dev \ libpq-dev \
nginx \ nginx
python3
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
setup_uv PYTHON_VERSION="3.12" setup_uv
msg_info "Installing Babybuddy" msg_info "Installing Babybuddy"
RELEASE=$(curl -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') RELEASE=$(curl -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
@ -33,8 +32,8 @@ curl -fsSL "https://github.com/babybuddy/babybuddy/archive/refs/tags/v${RELEASE}
tar zxf "$temp_file" --strip-components=1 -C /opt/babybuddy tar zxf "$temp_file" --strip-components=1 -C /opt/babybuddy
cd /opt/babybuddy cd /opt/babybuddy
$STD uv venv .venv $STD uv venv .venv
$STD source .venv/bin/activate $STD .venv/bin/uv pip install -r requirements.txt
$STD uv pip install -r requirements.txt
cp babybuddy/settings/production.example.py babybuddy/settings/production.py cp babybuddy/settings/production.example.py babybuddy/settings/production.py
SECRET_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32) SECRET_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
ALLOWED_HOSTS=$(hostname -I | tr ' ' ',' | sed 's/,$//')",127.0.0.1,localhost" ALLOWED_HOSTS=$(hostname -I | tr ' ' ',' | sed 's/,$//')",127.0.0.1,localhost"
@ -44,7 +43,7 @@ sed -i \
babybuddy/settings/production.py babybuddy/settings/production.py
export DJANGO_SETTINGS_MODULE=babybuddy.settings.production export DJANGO_SETTINGS_MODULE=babybuddy.settings.production
$STD python manage.py migrate $STD /opt/babybuddy/.venv/bin/python manage.py migrate
chown -R www-data:www-data /opt/data chown -R www-data:www-data /opt/data
chmod 640 /opt/data/db.sqlite3 chmod 640 /opt/data/db.sqlite3
chmod 750 /opt/data chmod 750 /opt/data
@ -93,7 +92,7 @@ server {
EOF EOF
ln -sf /etc/nginx/sites-available/babybuddy /etc/nginx/sites-enabled/babybuddy ln -sf /etc/nginx/sites-available/babybuddy /etc/nginx/sites-enabled/babybuddy
rm /etc/nginx/sites-enabled/default rm -f /etc/nginx/sites-enabled/default
systemctl enable -q --now nginx systemctl enable -q --now nginx
service nginx reload service nginx reload
msg_ok "Configured NGINX" msg_ok "Configured NGINX"

View File

@ -13,20 +13,15 @@ setting_up_container
network_check network_check
update_os update_os
msg_info "Setup Python3" PYTHON_VERSION="3.12" setup_uv
$STD apt-get install -y \
python3 \
python3-dev \
python3-pip
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
msg_ok "Setup Python3"
msg_info "Installing Bazarr" msg_info "Installing Bazarr"
mkdir -p /var/lib/bazarr/ mkdir -p /var/lib/bazarr/
curl -fsSL "https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip" -o "bazarr.zip" curl -fsSL "https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip" -o "bazarr.zip"
$STD unzip bazarr -d /opt/bazarr $STD unzip bazarr -d /opt/bazarr
chmod 775 /opt/bazarr /var/lib/bazarr/ chmod 775 /opt/bazarr /var/lib/bazarr/
$STD python3 -m pip install -q -r /opt/bazarr/requirements.txt cd /opt/bazarr
$STD /opt/bazarr/.venv/bin/uv pip install -r requirements.txt
msg_ok "Installed Bazarr" msg_ok "Installed Bazarr"
msg_info "Creating Service" msg_info "Creating Service"
@ -41,7 +36,7 @@ UMask=0002
Restart=on-failure Restart=on-failure
RestartSec=5 RestartSec=5
Type=simple Type=simple
ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py ExecStart=/opt/bazarr/.venv/bin/python /opt/bazarr/bazarr.py
KillSignal=SIGINT KillSignal=SIGINT
TimeoutStopSec=20 TimeoutStopSec=20
SyslogIdentifier=bazarr SyslogIdentifier=bazarr

View File

@ -43,24 +43,19 @@ $STD apt-get install -y \
ca-certificates ca-certificates
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Setup Python3" PYTHON_VERSION="3.12" setup_uv
$STD apt-get install -y \
python3 \
python3-dev \
python3-pip
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
msg_ok "Setup Python3"
NODE_VERSION="22" install_node_and_modules NODE_VERSION="22" install_node_and_modules
msg_info "Installing Change Detection" msg_info "Installing Change Detection"
mkdir /opt/changedetection mkdir -p /opt/changedetection
$STD pip3 install changedetection.io cd /opt/changedetection
$STD uv venv .venv
$STD /opt/changedetection/.venv/bin/uv pip install changedetection.io
msg_ok "Installed Change Detection" msg_ok "Installed Change Detection"
msg_info "Installing Browserless & Playwright" msg_info "Installing Browserless & Playwright"
mkdir /opt/browserless mkdir /opt/browserless
$STD python3 -m pip install playwright $STD /opt/paperless/.venv/bin/uv pip install playwright
$STD git clone https://github.com/browserless/chrome /opt/browserless $STD git clone https://github.com/browserless/chrome /opt/browserless
$STD npm install --prefix /opt/browserless $STD npm install --prefix /opt/browserless
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null $STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null
@ -117,7 +112,7 @@ Type=simple
WorkingDirectory=/opt/changedetection WorkingDirectory=/opt/changedetection
Environment=WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub Environment=WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
Environment=PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch={"defaultViewport":{"height":720,"width":1280},"headless":false,"stealth":true}&blockAds=true Environment=PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch={"defaultViewport":{"height":720,"width":1280},"headless":false,"stealth":true}&blockAds=true
ExecStart=changedetection.io -d /opt/changedetection -p 5000 ExecStart=/opt/changedetection/.venv/bin/changedetection.io -d /opt/changedetection -p 5000
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF