Files
ProxmoxVE/install/wizarr-install.sh
T
CanbiZ (MickLesk) f765af342f Let uv see the project before syncing it
uv refuses to run when a project pins a required-version it does not
match, in either direction: RomM pins ==0.12.13, which fails against
both the 0.10.3 a container was built with and the 0.12.17 latest
installs.

UV_PROJECT_DIR points setup_uv at the project so it reads that pin. It
is a prefix like PYTHON_VERSION and UV_VERSION, and the call sits
directly under fetch_and_deploy: the project is on disk by then, and
the deploy has closed its message block, which setup_uv needs since it
opens one of its own. That is also the only call needed - nothing
between the old early call and the deploy uses uv or Python, so the two
collapse into one.

Two things found along the way:

UV_PYTHON was set as a command prefix on setup_uv in 14 places. setup_uv
reads PYTHON_VERSION, never UV_PYTHON, and a prefix assignment does not
outlive the call, so those pins did nothing. They now use
PYTHON_VERSION, which installs the interpreter they were asking for.

Five update scripts had no setup_uv at all while their install
counterpart pinned a Python version. They now carry the same pin.

immich is left out: it runs uv through sudo -u inside a retry loop.
2026-09-22 14:34:03 +02:00

86 lines
1.8 KiB
Bash

#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/wizarrrr/wizarr
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y sqlite3
msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr" "tarball"
UV_PROJECT_DIR="/opt/wizarr" setup_uv
msg_info "Configure Wizarr"
cd /opt/wizarr
$STD /usr/local/bin/uv sync --frozen
$STD /usr/local/bin/uv run --frozen pybabel compile -d app/translations
$STD npm --prefix app/static install
$STD npm --prefix app/static run build
mkdir -p ./.cache
cat <<EOF >/opt/wizarr/.env
FLASK_ENV=production
GUNICORN_WORKERS=4
APP_URL=http://${LOCAL_IP}
HOST=0.0.0.0
PORT=5690
DISABLE_BUILTIN_AUTH=false
LOG_LEVEL=INFO
APP_VERSION=$(get_latest_github_release "wizarrrr/wizarr")
EOF
cat <<EOF >/opt/wizarr/start.sh
#!/usr/bin/env bash
uv run --frozen gunicorn \
--config gunicorn.conf.py \
--preload \
--umask 007 \
run:app
EOF
chmod u+x /opt/wizarr/start.sh
msg_ok "Configure Wizarr"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/wizarr.service
[Unit]
Description=Wizarr Service
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/wizarr
EnvironmentFile=/opt/wizarr/.env
ExecStart=/opt/wizarr/start.sh
Restart=always
RestartSec=10
KillMode=mixed
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target
EOF
msg_ok "Created Service"
msg_info "Running DB upgrade"
export FLASK_SKIP_SCHEDULER=true
$STD /usr/local/bin/uv run --frozen flask db upgrade
msg_ok "DB upgrade complete"
systemctl enable -q --now wizarr
motd_ssh
customize
cleanup_lxc