Skip to content

Commit 4915388

Browse files
'Add new script' (#5273)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
1 parent c46d543 commit 4915388

File tree

4 files changed

+200
-0
lines changed

4 files changed

+200
-0
lines changed

ct/headers/wizarr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_ ___
2+
| | / (_)___ ____ ___________
3+
| | /| / / /_ / / __ `/ ___/ ___/
4+
| |/ |/ / / / /_/ /_/ / / / /
5+
|__/|__/_/ /___/\__,_/_/ /_/
6+

ct/wizarr.sh

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: vhsdream
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/wizarrrr/wizarr
7+
8+
APP="Wizarr"
9+
var_tags="${var_tags:-media;arr}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-1024}"
12+
var_disk="${var_disk:-4}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -d /opt/wizarr ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
32+
RELEASE=$(curl -fsSL https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
33+
if [[ "${RELEASE}" != "$(cat ~/.wizarr 2>/dev/null)" ]] || [[ ! -f ~/.wizarr ]]; then
34+
msg_info "Stopping $APP"
35+
systemctl stop wizarr
36+
msg_ok "Stopped $APP"
37+
38+
msg_info "Creating Backup"
39+
BACKUP_FILE="/opt/wizarr_backup_$(date +%F).tar.gz"
40+
$STD tar -czf "$BACKUP_FILE" /opt/wizarr/{.env,start.sh} /opt/wizarr/database/ &>/dev/null
41+
msg_ok "Backup Created"
42+
43+
setup_uv
44+
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
45+
46+
msg_info "Updating $APP to v${RELEASE}"
47+
cd /opt/wizarr
48+
uv -q sync --locked
49+
$STD uv -q run pybabel compile -d app/translations
50+
$STD npm --prefix app/static install
51+
$STD npm --prefix app/static run build:css
52+
mkdir -p ./.cache
53+
$STD tar -xf "$BACKUP_FILE" --directory=/
54+
$STD uv -q run flask db upgrade
55+
msg_ok "Updated $APP to v${RELEASE}"
56+
57+
msg_info "Starting $APP"
58+
systemctl start wizarr
59+
msg_ok "Started $APP"
60+
61+
msg_info "Cleaning Up"
62+
rm -rf "$BACKUP_FILE"
63+
rm /tmp/"$RELEASE".zip
64+
msg_ok "Cleanup Completed"
65+
msg_ok "Update Successful"
66+
else
67+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
68+
fi
69+
exit
70+
}
71+
72+
start
73+
build_container
74+
description
75+
76+
msg_ok "Completed Successfully!\n"
77+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
78+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
79+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5690${CL}"

frontend/public/json/wizarr.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "Wizarr",
3+
"slug": "wizarr",
4+
"categories": [
5+
14,
6+
13
7+
],
8+
"date_created": "2025-06-05",
9+
"type": "ct",
10+
"updateable": true,
11+
"privileged": false,
12+
"interface_port": 5690,
13+
"documentation": "https://docs.wizarr.dev/",
14+
"website": "https://docs.wizarr.dev/",
15+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/wizarr.webp",
16+
"config_path": "/opt/wizarr/.env",
17+
"description": "Wizarr is an automatic user invitation system for Plex, Jellyfin and Emby. Create a unique link and share it to a user and they will automatically be invited to your media Server",
18+
"install_methods": [
19+
{
20+
"type": "default",
21+
"script": "ct/wizarr.sh",
22+
"resources": {
23+
"cpu": 1,
24+
"ram": 1024,
25+
"hdd": 4,
26+
"os": "debian",
27+
"version": "12"
28+
}
29+
}
30+
],
31+
"default_credentials": {
32+
"username": null,
33+
"password": null
34+
},
35+
"notes": []
36+
}

install/wizarr-install.sh

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: vhsdream
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/wizarrrr/wizarr
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt-get install -y sqlite3
18+
msg_ok "Installed Dependencies"
19+
20+
setup_uv
21+
NODE_VERSION="22" setup_nodejs
22+
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
23+
24+
msg_info "Configure ${APPLICATION}"
25+
cd /opt/wizarr
26+
uv -q sync --locked
27+
$STD uv -q run pybabel compile -d app/translations
28+
$STD npm --prefix app/static install
29+
$STD npm --prefix app/static run build:css
30+
mkdir -p ./.cache
31+
$STD uv -q run flask db upgrade
32+
msg_ok "Configure ${APPLICATION}"
33+
34+
msg_info "Creating env, start script and service"
35+
LOCAL_IP="$(hostname -I | awk '{print $1}')"
36+
cat <<EOF >/opt/wizarr/.env
37+
APP_URL=http://${LOCAL_IP}
38+
DISABLE_BUILTIN_AUTH=false
39+
LOG_LEVEL=INFO
40+
EOF
41+
42+
cat <<EOF >/opt/wizarr/start.sh
43+
#!/usr/bin/env bash
44+
45+
uv run gunicorn \
46+
--config gunicorn.conf.py \
47+
--preload \
48+
--workers 4 \
49+
--bind 0.0.0.0:5690 \
50+
--umask 007 \
51+
run:app
52+
EOF
53+
chmod u+x /opt/wizarr/start.sh
54+
55+
cat <<EOF >/etc/systemd/system/wizarr.service
56+
[Unit]
57+
Description=${APPLICATION} Service
58+
After=network.target
59+
60+
[Service]
61+
Type=simple
62+
WorkingDirectory=/opt/wizarr
63+
EnvironmentFile=/opt/wizarr/.env
64+
ExecStart=/opt/wizarr/start.sh
65+
Restart=on-abnormal
66+
67+
[Install]
68+
WantedBy=multi-user.target
69+
EOF
70+
systemctl enable -q --now wizarr
71+
msg_ok "Created env, start script and service"
72+
73+
motd_ssh
74+
customize
75+
76+
msg_info "Cleaning up"
77+
$STD apt-get -y autoremove
78+
$STD apt-get -y autoclean
79+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)