Skip to content

Commit 7b8fcab

Browse files
authored
Wizarr: fix #7545 (#7552)
- ensure to delete contents of migrations/versions folder prior to flask operations - use `--frozen` for uv operations rather than locking
1 parent b733e8b commit 7b8fcab

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

ct/wizarr.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,23 @@ function update_script() {
3939
msg_info "Creating Backup"
4040
BACKUP_FILE="/opt/wizarr_backup_$(date +%F).tar.gz"
4141
$STD tar -czf "$BACKUP_FILE" /opt/wizarr/{.env,start.sh} /opt/wizarr/database/ &>/dev/null
42+
rm -rf /opt/wizarr/migrations/versions/*
4243
msg_ok "Backup Created"
4344

4445
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
4546

4647
msg_info "Updating $APP"
4748
cd /opt/wizarr
48-
$STD /usr/local/bin/uv lock
49-
$STD /usr/local/bin/uv sync --locked
50-
$STD /usr/local/bin/uv run pybabel compile -d app/translations
49+
$STD /usr/local/bin/uv sync --frozen
50+
$STD /usr/local/bin/uv run --frozen pybabel compile -d app/translations
5151
$STD npm --prefix app/static install
5252
$STD npm --prefix app/static run build:css
5353
mkdir -p ./.cache
5454
$STD tar -xf "$BACKUP_FILE" --directory=/
55-
$STD /usr/local/bin/uv run flask db upgrade
55+
$STD /usr/local/bin/uv run --frozen flask db upgrade
56+
if ! grep -q 'frozen' /opt/wizarr/start.sh; then
57+
sed -i 's/run/& --frozen/' /opt/wizarr/start.sh
58+
fi
5659
msg_ok "Updated $APP"
5760

5861
msg_info "Starting $APP"

install/wizarr-install.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
2323

2424
msg_info "Configure ${APPLICATION}"
2525
cd /opt/wizarr
26-
$STD /usr/local/bin/uv lock
27-
$STD /usr/local/bin/uv sync --locked
28-
$STD /usr/local/bin/uv run pybabel compile -d app/translations
26+
$STD /usr/local/bin/uv sync --frozen
27+
$STD /usr/local/bin/uv run --frozen pybabel compile -d app/translations
2928
$STD npm --prefix app/static install
3029
$STD npm --prefix app/static run build:css
3130
mkdir -p ./.cache
32-
$STD /usr/local/bin/uv run flask db upgrade
31+
$STD /usr/local/bin/uv run --frozen flask db upgrade
3332
msg_ok "Configure ${APPLICATION}"
3433

3534
msg_info "Creating env, start script and service"
@@ -43,7 +42,7 @@ EOF
4342
cat <<EOF >/opt/wizarr/start.sh
4443
#!/usr/bin/env bash
4544
46-
uv run gunicorn \
45+
uv run --frozen gunicorn \
4746
--config gunicorn.conf.py \
4847
--preload \
4948
--workers 4 \

0 commit comments

Comments
 (0)