Wizarr: build and other fixes
This commit is contained in:
parent
ecff502e0a
commit
fc0a4d914d
@ -36,8 +36,8 @@ function update_script() {
|
|||||||
msg_ok "Stopped $APP"
|
msg_ok "Stopped $APP"
|
||||||
|
|
||||||
msg_info "Creating Backup"
|
msg_info "Creating Backup"
|
||||||
BACKUP_PATH="/opt/wizarr_backup_$(date +%F).tar.gz"
|
BACKUP_FILE="/opt/wizarr_backup_$(date +%F).tar.gz"
|
||||||
$STD tar -czf "$BACKUP_PATH" /opt/"$APP"/{.env,start.sh}
|
$STD tar -czf "$BACKUP_FILE" /opt/wizarr/{.env,start.sh} /opt/wizarr/database/*
|
||||||
msg_ok "Backup Created"
|
msg_ok "Backup Created"
|
||||||
|
|
||||||
msg_info "Updating $APP to v${RELEASE}"
|
msg_info "Updating $APP to v${RELEASE}"
|
||||||
@ -47,7 +47,10 @@ function update_script() {
|
|||||||
mv wizarr-${RELEASE}/ /opt/wizarr
|
mv wizarr-${RELEASE}/ /opt/wizarr
|
||||||
cd /opt/wizarr
|
cd /opt/wizarr
|
||||||
uv -q sync --locked
|
uv -q sync --locked
|
||||||
ln -s ./app/translations ./translations
|
uv -q run pylabel compile -d app/translations
|
||||||
|
$STD npm --prefix app/static install
|
||||||
|
mkdir -p ./.cache
|
||||||
|
uv -q run flask db upgrade
|
||||||
$STD tar -xf "$BACKUP_PATH" --directory=/
|
$STD tar -xf "$BACKUP_PATH" --directory=/
|
||||||
msg_ok "Updated $APP to v${RELEASE}"
|
msg_ok "Updated $APP to v${RELEASE}"
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ $STD apt-get install -y \
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
setup_uv
|
setup_uv
|
||||||
|
NODE_VERSION="22" install_node_and_modules
|
||||||
|
|
||||||
msg_info "Installing ${APPLICATION}"
|
msg_info "Installing ${APPLICATION}"
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
@ -30,7 +31,10 @@ unzip -q /tmp/"$RELEASE".zip
|
|||||||
mv wizarr-${RELEASE}/ /opt/wizarr
|
mv wizarr-${RELEASE}/ /opt/wizarr
|
||||||
cd /opt/wizarr
|
cd /opt/wizarr
|
||||||
uv -q sync --locked
|
uv -q sync --locked
|
||||||
ln -s ./app/translations ./translations
|
uv -q run pylabel compile -d app/translations
|
||||||
|
$STD npm --prefix app/static install
|
||||||
|
mkdir -p ./.cache
|
||||||
|
uv -q run flask db upgrade
|
||||||
echo "${RELEASE}" >/opt/wizarr_version.txt
|
echo "${RELEASE}" >/opt/wizarr_version.txt
|
||||||
msg_ok "Installed ${APPLICATION}"
|
msg_ok "Installed ${APPLICATION}"
|
||||||
|
|
||||||
@ -40,13 +44,12 @@ cat <<EOF >/opt/wizarr/.env
|
|||||||
APP_URL=http://${LOCAL_IP}
|
APP_URL=http://${LOCAL_IP}
|
||||||
DISABLE_BUILTIN_AUTH=false
|
DISABLE_BUILTIN_AUTH=false
|
||||||
LOG_LEVEL=INFO
|
LOG_LEVEL=INFO
|
||||||
SECRET_KEY="$(openssl rand -base64 30)"
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >/opt/wizarr/start.sh
|
cat <<EOF >/opt/wizarr/start.sh
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
uv run flask db upgrade && uv run gunicorn \
|
uv run gunicorn \
|
||||||
--config gunicorn.conf.py \
|
--config gunicorn.conf.py \
|
||||||
--preload \
|
--preload \
|
||||||
--workers 4 \
|
--workers 4 \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user