- ensure to delete contents of migrations/versions folder prior to flask
operations
- use `--frozen` for uv operations rather than locking
This commit is contained in:
Chris 2025-09-10 10:21:52 -04:00 committed by GitHub
parent b733e8b5ea
commit 7b8fcab242
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 9 deletions

View file

@ -39,20 +39,23 @@ function update_script() {
msg_info "Creating Backup" msg_info "Creating Backup"
BACKUP_FILE="/opt/wizarr_backup_$(date +%F).tar.gz" BACKUP_FILE="/opt/wizarr_backup_$(date +%F).tar.gz"
$STD tar -czf "$BACKUP_FILE" /opt/wizarr/{.env,start.sh} /opt/wizarr/database/ &>/dev/null $STD tar -czf "$BACKUP_FILE" /opt/wizarr/{.env,start.sh} /opt/wizarr/database/ &>/dev/null
rm -rf /opt/wizarr/migrations/versions/*
msg_ok "Backup Created" msg_ok "Backup Created"
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr" fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
msg_info "Updating $APP" msg_info "Updating $APP"
cd /opt/wizarr cd /opt/wizarr
$STD /usr/local/bin/uv lock $STD /usr/local/bin/uv sync --frozen
$STD /usr/local/bin/uv sync --locked $STD /usr/local/bin/uv run --frozen pybabel compile -d app/translations
$STD /usr/local/bin/uv run pybabel compile -d app/translations
$STD npm --prefix app/static install $STD npm --prefix app/static install
$STD npm --prefix app/static run build:css $STD npm --prefix app/static run build:css
mkdir -p ./.cache mkdir -p ./.cache
$STD tar -xf "$BACKUP_FILE" --directory=/ $STD tar -xf "$BACKUP_FILE" --directory=/
$STD /usr/local/bin/uv run flask db upgrade $STD /usr/local/bin/uv run --frozen flask db upgrade
if ! grep -q 'frozen' /opt/wizarr/start.sh; then
sed -i 's/run/& --frozen/' /opt/wizarr/start.sh
fi
msg_ok "Updated $APP" msg_ok "Updated $APP"
msg_info "Starting $APP" msg_info "Starting $APP"

View file

@ -23,13 +23,12 @@ fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
msg_info "Configure ${APPLICATION}" msg_info "Configure ${APPLICATION}"
cd /opt/wizarr cd /opt/wizarr
$STD /usr/local/bin/uv lock $STD /usr/local/bin/uv sync --frozen
$STD /usr/local/bin/uv sync --locked $STD /usr/local/bin/uv run --frozen pybabel compile -d app/translations
$STD /usr/local/bin/uv run pybabel compile -d app/translations
$STD npm --prefix app/static install $STD npm --prefix app/static install
$STD npm --prefix app/static run build:css $STD npm --prefix app/static run build:css
mkdir -p ./.cache mkdir -p ./.cache
$STD /usr/local/bin/uv run flask db upgrade $STD /usr/local/bin/uv run --frozen flask db upgrade
msg_ok "Configure ${APPLICATION}" msg_ok "Configure ${APPLICATION}"
msg_info "Creating env, start script and service" msg_info "Creating env, start script and service"
@ -43,7 +42,7 @@ EOF
cat <<EOF >/opt/wizarr/start.sh cat <<EOF >/opt/wizarr/start.sh
#!/usr/bin/env bash #!/usr/bin/env bash
uv run gunicorn \ uv run --frozen gunicorn \
--config gunicorn.conf.py \ --config gunicorn.conf.py \
--preload \ --preload \
--workers 4 \ --workers 4 \