mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-21 18:00:29 +00:00
Compare commits
18
Commits
2026-09-19
..
main
@@ -546,8 +546,34 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-09-21
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- AudioMuse-AI ([#17415](https://github.com/community-scripts/ProxmoxVE/pull/17415))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fix(portabase): meet the default admin password rules [@maksimtech](https://github.com/maksimtech) ([#17384](https://github.com/community-scripts/ProxmoxVE/pull/17384))
|
||||
- truenas-vm: strip the G before the storage allocation [@MickLesk](https://github.com/MickLesk) ([#17407](https://github.com/community-scripts/ProxmoxVE/pull/17407))
|
||||
- Librenms - Fix local snmpd community string setup [@dopch](https://github.com/dopch) ([#17363](https://github.com/community-scripts/ProxmoxVE/pull/17363))
|
||||
- fix(iventoy): preserve release data and migrate legacy service launchers [@Msprg](https://github.com/Msprg) ([#17161](https://github.com/community-scripts/ProxmoxVE/pull/17161))
|
||||
- xyops: bump Node.js from 22 to 24 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#17398](https://github.com/community-scripts/ProxmoxVE/pull/17398))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- github-api: take the release the maintainer marked as latest [@MickLesk](https://github.com/MickLesk) ([core#55](https://github.com/community-scripts/core/pull/55))
|
||||
- general: prune old Rust toolchains [@MickLesk](https://github.com/MickLesk) ([core#52](https://github.com/community-scripts/core/pull/52))
|
||||
- Ask when the preselected storage cannot hold the content [@MickLesk](https://github.com/MickLesk) ([core#51](https://github.com/community-scripts/core/pull/51))
|
||||
|
||||
## 2026-09-20
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Your-Spotify ([#17376](https://github.com/community-scripts/ProxmoxVE/pull/17376))
|
||||
|
||||
## 2026-09-19
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/NeptuneHub/AudioMuse-AI
|
||||
|
||||
APP="AudioMuse-AI"
|
||||
var_tags="${var_tags:-music;ai}"
|
||||
var_cpu="${var_cpu:-4}"
|
||||
var_ram="${var_ram:-8192}"
|
||||
var_disk="${var_disk:-20}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
#var_arm64="${var_arm64:-no}"
|
||||
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/audiomuse-ai ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "audiomuse-ai" "NeptuneHub/AudioMuse-AI"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop audiomuse-ai audiomuse-ai-worker audiomuse-ai-worker-high audiomuse-ai-janitor audiomuse-ai-control
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "audiomuse-ai" "NeptuneHub/AudioMuse-AI" "tarball"
|
||||
|
||||
AUDIOMUSE_BACKEND="$(cat /opt/audiomuse-ai_data/.backend 2>/dev/null || echo cpu)"
|
||||
REQ_COMMON="common.txt"
|
||||
case "$AUDIOMUSE_BACKEND" in
|
||||
gpu)
|
||||
REQ_ACCEL="gpu.txt"
|
||||
[[ "$(uname -m)" == "aarch64" ]] && REQ_ACCEL="gpu-arm64.txt"
|
||||
;;
|
||||
cpu-noavx2)
|
||||
REQ_COMMON="common-noavx2.txt"
|
||||
REQ_ACCEL="cpu-noavx2.txt"
|
||||
;;
|
||||
*)
|
||||
REQ_ACCEL="cpu.txt"
|
||||
;;
|
||||
esac
|
||||
|
||||
msg_info "Updating Python Environment (${AUDIOMUSE_BACKEND})"
|
||||
cd /opt/audiomuse-ai
|
||||
$STD uv venv --seed --python 3.12 /opt/audiomuse-ai/.venv
|
||||
$STD uv pip install --python /opt/audiomuse-ai/.venv \
|
||||
-r "/opt/audiomuse-ai/requirements/${REQ_COMMON}" \
|
||||
-r "/opt/audiomuse-ai/requirements/${REQ_ACCEL}"
|
||||
msg_ok "Updated Python Environment (${AUDIOMUSE_BACKEND})"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start audiomuse-ai audiomuse-ai-worker audiomuse-ai-worker-high audiomuse-ai-janitor audiomuse-ai-control
|
||||
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 "${GATEWAY}${BGN}http://${IP}:8000${CL}"
|
||||
@@ -0,0 +1,6 @@
|
||||
___ ___ __ ___ ___ ____
|
||||
/ | __ ______/ (_)___ / |/ /_ __________ / | / _/
|
||||
/ /| |/ / / / __ / / __ \/ /|_/ / / / / ___/ _ \______/ /| | / /
|
||||
/ ___ / /_/ / /_/ / / /_/ / / / / /_/ (__ ) __/_____/ ___ |_/ /
|
||||
/_/ |_\__,_/\__,_/_/\____/_/ /_/\__,_/____/\___/ /_/ |_/___/
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
__ __ _____ __ _ ____
|
||||
\ \/ /___ __ _______ / ___/____ ____ / /_(_) __/_ __
|
||||
\ / __ \/ / / / ___/_____\__ \/ __ \/ __ \/ __/ / /_/ / / /
|
||||
/ / /_/ / /_/ / / /_____/__/ / /_/ / /_/ / /_/ / __/ /_/ /
|
||||
/_/\____/\__,_/_/ /____/ .___/\____/\__/_/_/ \__, /
|
||||
/_/ /____/
|
||||
+31
-3
@@ -33,15 +33,43 @@ function update_script() {
|
||||
|
||||
if check_for_gh_release "iventoy" "ventoy/PXE"; then
|
||||
msg_info "Stopping iVentoy"
|
||||
$STD /opt/iventoy/iventoy.sh stop
|
||||
systemctl stop iventoy
|
||||
msg_ok "Stopped iVentoy"
|
||||
|
||||
create_backup /opt/iventoy/data /opt/iventoy/iso
|
||||
# Only preserve user state; data/iventoy.dat must match the new executable.
|
||||
create_backup /opt/iventoy/data/config.dat /opt/iventoy/iso /opt/iventoy/user
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "iventoy" "ventoy/PXE" "prebuild" "latest" "/opt/iventoy" "iventoy-*-linux-$(arch_resolve x86_64-free arm64-trial).tar.gz"
|
||||
restore_backup
|
||||
|
||||
# Migrate existing services that invoke the Bash launcher with sh.
|
||||
mkdir -p /etc/systemd/system/iventoy.service.d
|
||||
cat <<EOF >/etc/systemd/system/iventoy.service.d/launcher.conf
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/bin/bash /opt/iventoy/iventoy.sh -R start
|
||||
ExecStop=
|
||||
ExecStop=/bin/bash /opt/iventoy/iventoy.sh stop
|
||||
PIDFile=/run/iventoy.pid
|
||||
RestartSec=5
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
|
||||
msg_info "Starting iVentoy"
|
||||
$STD /opt/iventoy/iventoy.sh -R start
|
||||
systemctl reset-failed iventoy
|
||||
systemctl start iventoy
|
||||
# The launcher can return success before the daemon fails initialization.
|
||||
local i ready=0
|
||||
for ((i = 0; i < 90; i++)); do
|
||||
if systemctl is-active --quiet iventoy && curl -fsS --max-time 2 "${IVENTOY_HEALTH_URL:-http://127.0.0.1:26000/}" >/dev/null 2>&1; then
|
||||
ready=1
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
if [[ "$ready" -ne 1 ]]; then
|
||||
msg_error "iVentoy did not become ready; check journalctl -u iventoy and /opt/iventoy/log/log.txt"
|
||||
exit 1
|
||||
fi
|
||||
msg_ok "Started iVentoy"
|
||||
msg_ok "Updated Successfully"
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Yooooomi/your_spotify
|
||||
|
||||
APP="Your-Spotify"
|
||||
var_tags="${var_tags:-music;analytics}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-3072}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
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/your-spotify ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "your-spotify" "Yooooomi/your_spotify"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop your-spotify your-spotify-web
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "your-spotify" "Yooooomi/your_spotify" "tarball"
|
||||
|
||||
msg_info "Building Your Spotify"
|
||||
cd /opt/your-spotify
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm --filter @your_spotify/server build
|
||||
$STD pnpm --filter @your_spotify/client build
|
||||
msg_ok "Built Your Spotify"
|
||||
|
||||
msg_info "Applying Client Configuration"
|
||||
API_ENDPOINT=$(grep '^API_ENDPOINT=' /opt/your-spotify.env | cut -d= -f2-)
|
||||
cp /opt/your-spotify/apps/client/build/variables-template.js /opt/your-spotify/apps/client/build/variables.js
|
||||
sed -i "s;__API_ENDPOINT__;${API_ENDPOINT};g" /opt/your-spotify/apps/client/build/variables.js
|
||||
sed -i "s#connect-src \(.*\);#connect-src 'self' ${API_ENDPOINT}/;#g" /opt/your-spotify/apps/client/build/index.html
|
||||
msg_ok "Applied Client Configuration"
|
||||
|
||||
msg_info "Restarting Services"
|
||||
systemctl restart your-spotify your-spotify-web
|
||||
msg_ok "Restarted 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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
echo -e "${INFO}${YW}Add your Spotify app keys to /opt/your-spotify.env first${CL}"
|
||||
echo -e "${INFO}${YW}Spotify rejects plain http redirect URIs on a LAN address.${CL}"
|
||||
echo -e "${INFO}${YW}Put this behind a TLS reverse proxy and register:${CL}"
|
||||
echo -e "${TAB}${DEFAULT}${BGN}https://your.domain/oauth/spotify/callback${CL}"
|
||||
echo -e "${INFO}${YW}Then set API_ENDPOINT to that https URL and rerun the update.${CL}"
|
||||
@@ -0,0 +1,250 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/NeptuneHub/AudioMuse-AI
|
||||
|
||||
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 \
|
||||
git \
|
||||
ffmpeg \
|
||||
libchromaprint-tools \
|
||||
libsndfile1 \
|
||||
libgomp1
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="16" setup_postgresql
|
||||
PG_DB_NAME="audiomuse" PG_DB_USER="audiomuse" setup_postgresql_db
|
||||
UV_PYTHON="3.12" setup_uv
|
||||
setup_hwaccel
|
||||
|
||||
fetch_and_deploy_gh_release "audiomuse-ai" "NeptuneHub/AudioMuse-AI" "tarball"
|
||||
|
||||
var_backend="${var_backend:-auto}"
|
||||
if [[ "$var_backend" == "auto" ]]; then
|
||||
if ! grep -qm1 avx2 /proc/cpuinfo; then
|
||||
var_backend="cpu-noavx2"
|
||||
elif [[ "${HWACCEL_VENDOR:-none}" == "nvidia" ]]; then
|
||||
var_backend="gpu"
|
||||
else
|
||||
var_backend="cpu"
|
||||
fi
|
||||
fi
|
||||
|
||||
REQ_COMMON="common.txt"
|
||||
case "$var_backend" in
|
||||
gpu)
|
||||
REQ_ACCEL="gpu.txt"
|
||||
[[ "$(uname -m)" == "aarch64" ]] && REQ_ACCEL="gpu-arm64.txt"
|
||||
;;
|
||||
cpu)
|
||||
REQ_ACCEL="cpu.txt"
|
||||
;;
|
||||
cpu-noavx2)
|
||||
REQ_COMMON="common-noavx2.txt"
|
||||
REQ_ACCEL="cpu-noavx2.txt"
|
||||
;;
|
||||
*)
|
||||
msg_error "Unknown var_backend '${var_backend}' (expected auto, gpu, cpu or cpu-noavx2)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
msg_info "Setting up Python Environment (${var_backend}, Patience)"
|
||||
cd /opt/audiomuse-ai
|
||||
$STD uv venv --seed --python 3.12 /opt/audiomuse-ai/.venv
|
||||
$STD uv pip install --python /opt/audiomuse-ai/.venv \
|
||||
-r "/opt/audiomuse-ai/requirements/${REQ_COMMON}" \
|
||||
-r "/opt/audiomuse-ai/requirements/${REQ_ACCEL}"
|
||||
mkdir -p /opt/audiomuse-ai_data
|
||||
echo "$var_backend" >/opt/audiomuse-ai_data/.backend
|
||||
msg_ok "Set up Python Environment (${var_backend})"
|
||||
|
||||
MODEL_DIR="/opt/audiomuse-ai_data/model"
|
||||
MODEL_URL="https://github.com/NeptuneHub/AudioMuse-AI/releases/download/v5.0.0-model"
|
||||
DCLAP_URL="https://github.com/NeptuneHub/AudioMuse-AI-DCLAP/releases/download/v1"
|
||||
|
||||
msg_info "Downloading ML Models (Patience)"
|
||||
mkdir -p "$MODEL_DIR/huggingface"
|
||||
for FILE in musicnn_embedding.onnx musicnn_prediction.onnx clap_text_model.onnx; do
|
||||
curl -fsSL "${MODEL_URL}/${FILE}" -o "${MODEL_DIR}/${FILE}"
|
||||
done
|
||||
for FILE in model_epoch_36.onnx model_epoch_36.onnx.data; do
|
||||
curl -fsSL "${DCLAP_URL}/${FILE}" -o "${MODEL_DIR}/${FILE}"
|
||||
done
|
||||
for BUNDLE in lyrics_model_whisper lyrics_model_silero_vad lyrics_model_gte_vnni; do
|
||||
curl -fsSL "${MODEL_URL}/${BUNDLE}.tar.gz" -o "/tmp/${BUNDLE}.tar.gz"
|
||||
tar -xzf "/tmp/${BUNDLE}.tar.gz" -C "$MODEL_DIR"
|
||||
rm -f "/tmp/${BUNDLE}.tar.gz"
|
||||
done
|
||||
curl -fsSL "${MODEL_URL}/huggingface_models.tar.gz" -o /tmp/huggingface_models.tar.gz
|
||||
tar -xzf /tmp/huggingface_models.tar.gz -C "${MODEL_DIR}/huggingface"
|
||||
rm -f /tmp/huggingface_models.tar.gz
|
||||
HF_HUB_DIR="${MODEL_DIR}/huggingface/hub"
|
||||
rm -rf "${HF_HUB_DIR}/models--bert-base-uncased" "${HF_HUB_DIR}/models--facebook--bart-base"
|
||||
if [[ -d "${HF_HUB_DIR}/models--roberta-base" ]]; then
|
||||
find "${HF_HUB_DIR}/models--roberta-base/blobs" -type f -size +10M -delete
|
||||
find "${HF_HUB_DIR}/models--roberta-base/snapshots" \( -name "model.safetensors" -o -name "pytorch_model.bin" \) -delete
|
||||
fi
|
||||
msg_ok "Downloaded ML Models"
|
||||
|
||||
msg_info "Configuring AudioMuse-AI"
|
||||
mkdir -p /opt/audiomuse-ai_data/{temp_audio,ivf_cache,plugins,backup} /opt/audiomuse-ai_data/cache/numba
|
||||
AUDIOMUSE_PASSWORD=$(openssl rand -base64 18)
|
||||
JWT_SECRET=$(openssl rand -hex 32)
|
||||
API_TOKEN=$(openssl rand -hex 32)
|
||||
cat <<EOF >/opt/audiomuse-ai_data/audiomuse.env
|
||||
POSTGRES_USER=audiomuse
|
||||
POSTGRES_PASSWORD=${PG_DB_PASS}
|
||||
POSTGRES_DB=audiomuse
|
||||
POSTGRES_HOST=127.0.0.1
|
||||
POSTGRES_PORT=5432
|
||||
TZ=UTC
|
||||
AUTH_ENABLED=true
|
||||
AUDIOMUSE_USER=admin
|
||||
AUDIOMUSE_PASSWORD=${AUDIOMUSE_PASSWORD}
|
||||
JWT_SECRET=${JWT_SECRET}
|
||||
API_TOKEN=${API_TOKEN}
|
||||
MEDIASERVER_TYPE=jellyfin
|
||||
JELLYFIN_URL=http://YOUR_JELLYFIN_IP:8096
|
||||
JELLYFIN_USER_ID=
|
||||
JELLYFIN_TOKEN=
|
||||
AI_MODEL_PROVIDER=NONE
|
||||
APP_DATA_DIR=/opt/audiomuse-ai_data
|
||||
TEMP_DIR=/opt/audiomuse-ai_data/temp_audio
|
||||
BACKUP_DIR=/opt/audiomuse-ai_data/backup
|
||||
RESTORE_LOG_DIR=/opt/audiomuse-ai_data/backup
|
||||
XDG_CACHE_HOME=/opt/audiomuse-ai_data/cache
|
||||
NUMBA_CACHE_DIR=/opt/audiomuse-ai_data/cache/numba
|
||||
HF_HOME=${MODEL_DIR}/huggingface
|
||||
HF_HUB_DISABLE_XET=1
|
||||
HF_XET_DISABLE=1
|
||||
EMBEDDING_MODEL_PATH=${MODEL_DIR}/musicnn_embedding.onnx
|
||||
PREDICTION_MODEL_PATH=${MODEL_DIR}/musicnn_prediction.onnx
|
||||
CLAP_AUDIO_MODEL_PATH=${MODEL_DIR}/model_epoch_36.onnx
|
||||
CLAP_TEXT_MODEL_PATH=${MODEL_DIR}/clap_text_model.onnx
|
||||
LYRICS_MODEL_DIR=${MODEL_DIR}
|
||||
LYRICS_WHISPER_MODEL_DIR=${MODEL_DIR}/whisper-small-onnx
|
||||
SILERO_VAD_ONNX_PATH=${MODEL_DIR}/silero_vad.onnx
|
||||
LYRICS_GTE_ONNX_PATH=${MODEL_DIR}/gte-multilingual-base-int8.onnx
|
||||
LYRICS_GTE_TOKENIZER_DIR=${MODEL_DIR}/gte-multilingual-base
|
||||
EOF
|
||||
{
|
||||
echo ""
|
||||
echo "AudioMuse-AI-Credentials"
|
||||
echo "Web UI User: admin"
|
||||
echo "Web UI Password: ${AUDIOMUSE_PASSWORD}"
|
||||
} >>~/audiomuse-ai.creds
|
||||
msg_ok "Configured AudioMuse-AI"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/audiomuse-ai.service
|
||||
[Unit]
|
||||
Description=AudioMuse-AI Web (Flask)
|
||||
After=network-online.target postgresql.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/audiomuse-ai
|
||||
EnvironmentFile=/opt/audiomuse-ai_data/audiomuse.env
|
||||
ExecStart=/opt/audiomuse-ai/.venv/bin/gunicorn --bind 0.0.0.0:8000 --workers 1 --threads 4 --worker-class gthread --keep-alive 5 --timeout 300 app:app
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/audiomuse-ai-worker.service
|
||||
[Unit]
|
||||
Description=AudioMuse-AI Queue Worker (default)
|
||||
After=network-online.target postgresql.service audiomuse-ai.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/audiomuse-ai
|
||||
EnvironmentFile=/opt/audiomuse-ai_data/audiomuse.env
|
||||
ExecStart=/opt/audiomuse-ai/.venv/bin/python -u -m taskqueue.worker --queue default
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/audiomuse-ai-worker-high.service
|
||||
[Unit]
|
||||
Description=AudioMuse-AI Queue Worker (high)
|
||||
After=network-online.target postgresql.service audiomuse-ai.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/audiomuse-ai
|
||||
EnvironmentFile=/opt/audiomuse-ai_data/audiomuse.env
|
||||
ExecStart=/opt/audiomuse-ai/.venv/bin/python -u -m taskqueue.worker --queue high
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/audiomuse-ai-janitor.service
|
||||
[Unit]
|
||||
Description=AudioMuse-AI Queue Maintenance
|
||||
After=network-online.target postgresql.service audiomuse-ai.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/audiomuse-ai
|
||||
EnvironmentFile=/opt/audiomuse-ai_data/audiomuse.env
|
||||
ExecStart=/opt/audiomuse-ai/.venv/bin/python -u -m taskqueue.maintenance
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/audiomuse-ai-control.service
|
||||
[Unit]
|
||||
Description=AudioMuse-AI Config Restart Listener
|
||||
After=network-online.target postgresql.service audiomuse-ai.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/audiomuse-ai
|
||||
EnvironmentFile=/opt/audiomuse-ai_data/audiomuse.env
|
||||
ExecStart=/opt/audiomuse-ai/.venv/bin/python -u -m taskqueue.control
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now audiomuse-ai audiomuse-ai-worker audiomuse-ai-worker-high audiomuse-ai-janitor audiomuse-ai-control
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -129,7 +129,7 @@ $STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms db:seed --force"
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms user:add -p ${APP_PASSWORD} ${APP_USER} --role=admin"
|
||||
|
||||
RANDOM_STRING=$(openssl rand -base64 16 | tr -dc 'a-zA-Z0-9')
|
||||
sed -i "s/RANDOMSTRINGHERE/$RANDOM_STRING/g" /etc/snmp/snmpd.conf
|
||||
sed -i "s/RANDOMSTRINGGOESHERE/$RANDOM_STRING/g" /etc/snmp/snmpd.conf
|
||||
echo "SNMP Community String: $RANDOM_STRING" >>~/librenms.creds
|
||||
curl -qso /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
|
||||
chmod +x /usr/bin/distro
|
||||
|
||||
@@ -33,7 +33,10 @@ mv -f "/opt/tusd/tusd_linux_$(arch_resolve)/tusd" /opt/tusd/tusd
|
||||
rm -rf "/opt/tusd/tusd_linux_$(arch_resolve)"
|
||||
chmod +x /opt/tusd/tusd
|
||||
PROJECT_SECRET=$(openssl rand -hex 32)
|
||||
ADMIN_PASSWORD=$(openssl rand -base64 18 | tr -dc 'A-Za-z0-9' | head -c 16)
|
||||
ADMIN_PASSWORD=""
|
||||
until [[ "$ADMIN_PASSWORD" =~ [a-z] && "$ADMIN_PASSWORD" =~ [A-Z] && "$ADMIN_PASSWORD" =~ [0-9] && "$ADMIN_PASSWORD" =~ [^a-zA-Z0-9] ]]; do
|
||||
ADMIN_PASSWORD=$(head -c 256 /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9@%+=_-' | head -c 16)
|
||||
done
|
||||
cat <<EOF >/opt/portabase/.env
|
||||
LOG_LEVEL=info
|
||||
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@127.0.0.1:5432/${PG_DB_NAME}
|
||||
|
||||
@@ -23,7 +23,7 @@ $STD apt install -y \
|
||||
zlib1g-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
fetch_and_deploy_gh_release "xyops" "pixlcore/xyops" "tarball"
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Yooooomi/your_spotify
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
setup_mongodb
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@^10,serve" setup_nodejs
|
||||
|
||||
fetch_and_deploy_gh_release "your-spotify" "Yooooomi/your_spotify" "tarball"
|
||||
|
||||
msg_info "Building Your Spotify"
|
||||
cd /opt/your-spotify
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm --filter @your_spotify/server build
|
||||
$STD pnpm --filter @your_spotify/client build
|
||||
msg_ok "Built Your Spotify"
|
||||
|
||||
var_api_endpoint="${var_api_endpoint:-http://${LOCAL_IP}:8080}"
|
||||
var_client_endpoint="${var_client_endpoint:-http://${LOCAL_IP}:3000}"
|
||||
var_spotify_public="${var_spotify_public:-CHANGE_ME}"
|
||||
var_spotify_secret="${var_spotify_secret:-CHANGE_ME}"
|
||||
|
||||
msg_info "Configuring Your Spotify"
|
||||
cat <<EOF >/opt/your-spotify.env
|
||||
API_ENDPOINT=${var_api_endpoint}
|
||||
CLIENT_ENDPOINT=${var_client_endpoint}
|
||||
SPOTIFY_PUBLIC=${var_spotify_public}
|
||||
SPOTIFY_SECRET=${var_spotify_secret}
|
||||
MONGO_ENDPOINT=mongodb://127.0.0.1:27017/your_spotify
|
||||
TIMEZONE=UTC
|
||||
LOG_LEVEL=info
|
||||
PORT=8080
|
||||
EOF
|
||||
chmod 600 /opt/your-spotify.env
|
||||
|
||||
cp /opt/your-spotify/apps/client/build/variables-template.js /opt/your-spotify/apps/client/build/variables.js
|
||||
sed -i "s;__API_ENDPOINT__;${var_api_endpoint};g" /opt/your-spotify/apps/client/build/variables.js
|
||||
sed -i "s#connect-src \(.*\);#connect-src 'self' ${var_api_endpoint}/;#g" /opt/your-spotify/apps/client/build/index.html
|
||||
msg_ok "Configured Your Spotify"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/your-spotify.service
|
||||
[Unit]
|
||||
Description=Your Spotify Server
|
||||
Wants=network-online.target
|
||||
After=network-online.target mongod.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/your-spotify/apps/server
|
||||
EnvironmentFile=/opt/your-spotify.env
|
||||
ExecStartPre=/usr/bin/node build/index.js --migrate
|
||||
ExecStart=/usr/bin/node build/index.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/your-spotify-web.service
|
||||
[Unit]
|
||||
Description=Your Spotify Web
|
||||
Wants=network-online.target
|
||||
After=network-online.target your-spotify.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/your-spotify/apps/client
|
||||
ExecStart=serve -s -l tcp://0.0.0.0:3000 /opt/your-spotify/apps/client/build
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now your-spotify your-spotify-web
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,12 @@
|
||||
____ __ _
|
||||
/ __ \___ / /_ (_)___ _____
|
||||
/ / / / _ \/ __ \/ / __ `/ __ \
|
||||
/ /_/ / __/ /_/ / / /_/ / / / /
|
||||
/_____/\___/_.___/_/\__,_/_/ /_/
|
||||
|
||||
____ __ _ __ __ _ _
|
||||
/ __ \___ / /_ (_)___ _____ _/ / _/_/ ______ _______ _____ __________(_)___ ____ | |
|
||||
/ / / / _ \/ __ \/ / __ `/ __ \ / __//_/| | / / __ `/ ___/ | / / _ \/ ___/ ___/ / __ \/ __ \ / /
|
||||
/ /_/ / __/ /_/ / / /_/ / / / / (_ < < | |/ / /_/ / / | |/ / __/ / (__ ) / /_/ / / / /_>_>
|
||||
/_____/\___/_.___/_/\__,_/_/ /_/ / _// / |___/\__,_/_/____|___/\___/_/ /____/_/\____/_/ /_//_/
|
||||
/_/ \_\ /_____/ /_/
|
||||
+2
-2
@@ -81,7 +81,7 @@ function default_settings() {
|
||||
VMID=$(get_valid_nextid)
|
||||
ISO_DEFAULT="latest stable"
|
||||
vm_apply_machine_type "q35"
|
||||
DISK_SIZE="16"
|
||||
DISK_SIZE="16G"
|
||||
DISK_CACHE=""
|
||||
HN="truenas"
|
||||
CPU_TYPE=" -cpu host"
|
||||
@@ -161,7 +161,7 @@ msg_info "Creating TrueNAS VM shell"
|
||||
qm create "$VMID"${MACHINE} -bios ovmf -agent enabled=1 -tablet 0 -localtime 1${CPU_TYPE} \
|
||||
-cores "$CORE_COUNT" -memory "$RAM_SIZE" -balloon 0 -name "$HN" -tags community-script \
|
||||
-net0 "virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU" -onboot 1 -ostype l26 \
|
||||
-efidisk0 $STORAGE:1,efitype=4m,pre-enrolled-keys=0 -sata0 $STORAGE:$DISK_SIZE,ssd=1 \
|
||||
-efidisk0 $STORAGE:1,efitype=4m,pre-enrolled-keys=0 -sata0 ${STORAGE}:${DISK_SIZE%G},ssd=1 \
|
||||
-scsihw virtio-scsi-single -cdrom local:iso/$ISO_NAME -boot order='sata0;ide2' -vga virtio >/dev/null
|
||||
msg_ok "Created VM shell"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user