From 62b4b5f2600d46a999bc2de032ce34c1b80b901b Mon Sep 17 00:00:00 2001
From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com>
Date: Wed, 20 May 2026 19:19:08 +0200
Subject: [PATCH] Profilarr v2: Update and Refactor whole Script (#14584)
---
ct/profilarr.sh | 86 +++++++++++++++++++++-----------
install/profilarr-install.sh | 97 ++++++++++++++++++++++++------------
2 files changed, 121 insertions(+), 62 deletions(-)
diff --git a/ct/profilarr.sh b/ct/profilarr.sh
index 7bf0582b2..b167cc41e 100644
--- a/ct/profilarr.sh
+++ b/ct/profilarr.sh
@@ -9,7 +9,7 @@ APP="Profilarr"
var_tags="${var_tags:-arr;radarr;sonarr;config}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
-var_disk="${var_disk:-8}"
+var_disk="${var_disk:-7}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
@@ -29,43 +29,71 @@ function update_script() {
exit
fi
+ if [[ -d /opt/profilarr/backend ]]; then
+ msg_error "Profilarr v1 detected!"
+ echo -e "\nProfilarr v2 is a complete rewrite and is NOT compatible with v1."
+ echo -e "There is no migration path. Please create a new LXC container for v2.\n"
+ exit
+ fi
+
+ if check_for_gh_release "deno" "denoland/deno"; then
+ ARCH=$(uname -m)
+ fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-${ARCH}-unknown-linux-gnu.zip"
+ fi
+
if check_for_gh_release "profilarr" "Dictionarry-Hub/profilarr"; then
msg_info "Stopping Service"
systemctl stop profilarr
msg_ok "Stopped Service"
- msg_info "Backing up Data"
- if [[ -d /config ]]; then
- cp -r /config /opt/profilarr_config_backup
- fi
- msg_ok "Backed up Data"
-
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "profilarr" "Dictionarry-Hub/profilarr" "tarball"
+ PROFILARR_VERSION=$(cat ~/.profilarr)
- msg_info "Installing Python Dependencies"
- cd /opt/profilarr/backend
- $STD uv venv --clear /opt/profilarr/backend/.venv
- sed 's/==/>=/g' requirements.txt >requirements-relaxed.txt
- $STD uv pip install --python /opt/profilarr/backend/.venv/bin/python -r requirements-relaxed.txt
- rm -f requirements-relaxed.txt
- msg_ok "Installed Python Dependencies"
+ msg_info "Building Profilarr v${PROFILARR_VERSION} (Patience)"
+ cd /opt/profilarr
+ cat >src/lib/shared/build.ts <=/g' requirements.txt >requirements-relaxed.txt
-$STD uv pip install --python /opt/profilarr/backend/.venv/bin/python -r requirements-relaxed.txt
-rm -f requirements-relaxed.txt
-msg_ok "Installed Python Dependencies"
+msg_info "Building Profilarr v${PROFILARR_VERSION} (Patience)"
+cd /opt/profilarr
+cat >src/lib/shared/build.ts </etc/default/profilarr
+PORT=6868
+HOST=0.0.0.0
+APP_BASE_PATH=/var/lib/profilarr
+DENO_SQLITE_PATH=${SQLITE_PATH}
+EOF
+msg_ok "Installed Profilarr"
msg_info "Creating Service"
cat </etc/systemd/system/profilarr.service
[Unit]
-Description=Profilarr - Configuration Management Platform for Radarr/Sonarr
+Description=Profilarr - Configuration Management for Radarr/Sonarr
After=network.target
[Service]
Type=simple
-User=root
-WorkingDirectory=/opt/profilarr/backend
-Environment="PATH=/opt/profilarr/backend/.venv/bin:/usr/local/bin:/usr/bin:/bin"
-Environment="PYTHONPATH=/opt/profilarr/backend"
-ExecStart=/opt/profilarr/backend/.venv/bin/gunicorn --bind 0.0.0.0:6868 --timeout 600 app.main:create_app()
-Restart=on-failure
+WorkingDirectory=/opt/profilarr/app
+EnvironmentFile=/etc/default/profilarr
+Environment=HOME=/root
+ExecStart=/opt/profilarr/app/profilarr
+Restart=always
RestartSec=5
[Install]