more uv migs
This commit is contained in:
parent
594dc3c9d5
commit
3b1a17c5a3
@ -19,11 +19,10 @@ $STD apt-get install -y \
|
||||
uwsgi-plugin-python3 \
|
||||
libopenjp2-7-dev \
|
||||
libpq-dev \
|
||||
nginx \
|
||||
python3
|
||||
nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_uv
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
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) }')
|
||||
@ -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
|
||||
cd /opt/babybuddy
|
||||
$STD uv venv .venv
|
||||
$STD source .venv/bin/activate
|
||||
$STD uv pip install -r requirements.txt
|
||||
$STD .venv/bin/uv pip install -r requirements.txt
|
||||
|
||||
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)
|
||||
ALLOWED_HOSTS=$(hostname -I | tr ' ' ',' | sed 's/,$//')",127.0.0.1,localhost"
|
||||
@ -44,7 +43,7 @@ sed -i \
|
||||
babybuddy/settings/production.py
|
||||
|
||||
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
|
||||
chmod 640 /opt/data/db.sqlite3
|
||||
chmod 750 /opt/data
|
||||
@ -93,7 +92,7 @@ server {
|
||||
EOF
|
||||
|
||||
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
|
||||
service nginx reload
|
||||
msg_ok "Configured NGINX"
|
||||
|
@ -13,20 +13,15 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Setup Python3"
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
msg_info "Installing Bazarr"
|
||||
mkdir -p /var/lib/bazarr/
|
||||
curl -fsSL "https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip" -o "bazarr.zip"
|
||||
$STD unzip bazarr -d /opt/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_info "Creating Service"
|
||||
@ -41,7 +36,7 @@ UMask=0002
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py
|
||||
ExecStart=/opt/bazarr/.venv/bin/python /opt/bazarr/bazarr.py
|
||||
KillSignal=SIGINT
|
||||
TimeoutStopSec=20
|
||||
SyslogIdentifier=bazarr
|
||||
|
@ -43,24 +43,19 @@ $STD apt-get install -y \
|
||||
ca-certificates
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
NODE_VERSION="22" install_node_and_modules
|
||||
|
||||
msg_info "Installing Change Detection"
|
||||
mkdir /opt/changedetection
|
||||
$STD pip3 install changedetection.io
|
||||
mkdir -p /opt/changedetection
|
||||
cd /opt/changedetection
|
||||
$STD uv venv .venv
|
||||
$STD /opt/changedetection/.venv/bin/uv pip install changedetection.io
|
||||
msg_ok "Installed Change Detection"
|
||||
|
||||
msg_info "Installing Browserless & Playwright"
|
||||
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 npm install --prefix /opt/browserless
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null
|
||||
@ -117,7 +112,7 @@ Type=simple
|
||||
WorkingDirectory=/opt/changedetection
|
||||
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
|
||||
ExecStart=changedetection.io -d /opt/changedetection -p 5000
|
||||
ExecStart=/opt/changedetection/.venv/bin/changedetection.io -d /opt/changedetection -p 5000
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
Loading…
x
Reference in New Issue
Block a user