From 7a71414d0e770d61a8c9541d2f00a15e101d89b1 Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 20:40:05 +0100 Subject: [PATCH] Add yubal (ct) (#10955) --- ct/headers/yubal | 6 +++ ct/yubal.sh | 66 ++++++++++++++++++++++++ frontend/public/json/yubal.json | 35 +++++++++++++ install/yubal-install.sh | 91 +++++++++++++++++++++++++++++++++ 4 files changed, 198 insertions(+) create mode 100644 ct/headers/yubal create mode 100644 ct/yubal.sh create mode 100644 frontend/public/json/yubal.json create mode 100644 install/yubal-install.sh diff --git a/ct/headers/yubal b/ct/headers/yubal new file mode 100644 index 000000000..700a03f72 --- /dev/null +++ b/ct/headers/yubal @@ -0,0 +1,6 @@ +__ __ __ __ +\ \/ /_ __/ /_ ____ _/ / + \ / / / / __ \/ __ `/ / + / / /_/ / /_/ / /_/ / / +/_/\__,_/_.___/\__,_/_/ + diff --git a/ct/yubal.sh b/ct/yubal.sh new file mode 100644 index 000000000..f112f024f --- /dev/null +++ b/ct/yubal.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Crazywolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/guillevc/yubal + +APP="Yubal" +var_tags="${var_tags:-music;media}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-15}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/yubal ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "yubal" "guillevc/yubal"; then + msg_info "Stopping Services" + systemctl stop yubal + msg_ok "Stopped Services" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "yubal" "guillevc/yubal" "tarball" "latest" "/opt/yubal" + + msg_info "Building Frontend" + cd /opt/yubal/web + $STD bun install --frozen-lockfile + VERSION=$(get_latest_github_release "guillevc/yubal") + VITE_VERSION=$VERSION VITE_COMMIT_SHA=$VERSION VITE_IS_RELEASE=true $STD bun run build + msg_ok "Built Frontend" + + msg_info "Installing Python Dependencies" + cd /opt/yubal + $STD uv sync --no-dev --frozen + msg_ok "Installed Python Dependencies" + + msg_info "Starting Services" + systemctl start yubal + msg_ok "Started Services" + msg_ok "Updated successfully!" + fi + exit +} + +start +build_container +description + +msg_ok "Completed successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}" diff --git a/frontend/public/json/yubal.json b/frontend/public/json/yubal.json new file mode 100644 index 000000000..42bc7676d --- /dev/null +++ b/frontend/public/json/yubal.json @@ -0,0 +1,35 @@ +{ + "name": "Yubal", + "slug": "yubal", + "categories": [ + 13 + ], + "date_created": "2026-01-05", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8000, + "documentation": "https://github.com/guillevc/yubal/blob/master/README.md", + "website": "https://github.com/guillevc/yubal", + "config_path": "/opt/yubal.env", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/yubal.webp", + "description": "YouTube Music album downloader with Spotify metadata auto-tagging.", + "install_methods": [ + { + "type": "default", + "script": "ct/yubal.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 15, + "os": "debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/install/yubal-install.sh b/install/yubal-install.sh new file mode 100644 index 000000000..c1ad21f5a --- /dev/null +++ b/install/yubal-install.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Crazywolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/guillevc/yubal + +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 \ + build-essential \ + libssl-dev \ + libffi-dev \ + python3-dev \ + ffmpeg +msg_ok "Installed Dependencies" + +msg_info "Installing Bun" +export BUN_INSTALL=/opt/bun +curl -fsSL https://bun.sh/install | $STD bash +ln -sf /opt/bun/bin/bun /usr/local/bin/bun +ln -sf /opt/bun/bin/bunx /usr/local/bin/bunx +msg_ok "Installed Bun" + +UV_VERSION="0.7.19" PYTHON_VERSION="3.12" setup_uv + +msg_info "Installing Deno" +$STD sh -c "curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh -s -- -y" +msg_ok "Installed Deno" + +msg_info "Creating directories" +mkdir -p /opt/yubal \ + /opt/yubal_data \ + /opt/yubal_config +msg_ok "Created directories" + +fetch_and_deploy_gh_release "yubal" "guillevc/yubal" "tarball" "latest" "/opt/yubal" + +msg_info "Building Frontend" +cd /opt/yubal/web +$STD bun install --frozen-lockfile +VERSION=$(get_latest_github_release "guillevc/yubal") +VITE_VERSION=$VERSION VITE_COMMIT_SHA=$VERSION VITE_IS_RELEASE=true $STD bun run build +msg_ok "Built Frontend" + +msg_info "Installing Python Dependencies" +cd /opt/yubal +export UV_CONCURRENT_DOWNLOADS=1 +$STD uv sync --package yubal-api --no-dev --frozen +msg_ok "Installed Python Dependencies" + +msg_info "Creating Service" +cat </opt/yubal.env +YUBAL_HOST=0.0.0.0 +YUBAL_PORT=8001 +YUBAL_DATA=/opt/yubal_data +YUBAL_CONFIG=/opt/yubal_config +YUBAL_ROOT=/opt/yubal +PYTHONUNBUFFERED=1 +EOF +cat </etc/systemd/system/yubal.service +[Unit] +Description=Yubal +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/yubal +EnvironmentFile=/opt/yubal.env +Environment="PATH=/opt/yubal/.venv/bin:/usr/local/bin:/usr/bin:/bin" +ExecStart=/opt/yubal/.venv/bin/python -m yubal +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now yubal +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc