yubal
This commit is contained in:
parent
918485b967
commit
ab61100ce7
2
.vscode/.shellcheckrc
vendored
2
.vscode/.shellcheckrc
vendored
@ -1 +1 @@
|
|||||||
disable=SC2034,SC1091,SC2155,SC2086,SC2317,SC2181
|
disable=SC2034,SC1091,SC2155,SC2086,SC2317,SC2181,SC2164
|
||||||
|
|||||||
66
ct/yubal.sh
Normal file
66
ct/yubal.sh
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2025 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")
|
||||||
|
$STD VITE_VERSION=$VERSION VITE_COMMIT_SHA=$VERSION VITE_IS_RELEASE=true 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}"
|
||||||
48
frontend/public/json/yubal.json
Normal file
48
frontend/public/json/yubal.json
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"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": "Yubal is a self-hosted music management application that helps you organize, tag, and stream your music collection. Features music library organization with Beets, YouTube music downloads, and a modern web interface.",
|
||||||
|
"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": [
|
||||||
|
{
|
||||||
|
"text": "First visit will prompt you to set up your music library",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Music files should be stored in /opt/yubal/data",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Configuration can be modified in /opt/yubal.env",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
91
install/yubal-install.sh
Normal file
91
install/yubal-install.sh
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: Crazywolf13
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/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"
|
||||||
|
curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh
|
||||||
|
msg_ok "Installed Deno"
|
||||||
|
|
||||||
|
msg_info "Creating directories"
|
||||||
|
mkdir -p /opt/yubal \
|
||||||
|
/opt/yubal/data \
|
||||||
|
/opt/yubal/ytdlp
|
||||||
|
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 --no-dev --frozen
|
||||||
|
msg_ok "Installed Python Dependencies"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/opt/yubal.env
|
||||||
|
YUBAL_HOST=0.0.0.0
|
||||||
|
YUBAL_PORT=8000
|
||||||
|
YUBAL_DATA_DIR=/opt/yubal/data
|
||||||
|
YUBAL_BEETS_DIR=/opt/yubal/beets
|
||||||
|
YUBAL_YTDLP_DIR=/opt/yubal/ytdlp
|
||||||
|
PYTHONUNBUFFERED=1
|
||||||
|
EOF
|
||||||
|
cat <<EOF >/etc/systemd/system/yubal.service
|
||||||
|
[Unit]
|
||||||
|
Description=Yubal Music Management
|
||||||
|
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
|
||||||
Loading…
x
Reference in New Issue
Block a user