fixes
This commit is contained in:
parent
3f85bc0620
commit
14260f2884
@ -36,11 +36,8 @@ function update_script() {
|
|||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
msg_info "Backing up Data"
|
msg_info "Backing up Data"
|
||||||
if [[ -d /opt/profilarr/data ]]; then
|
if [[ -d /config ]]; then
|
||||||
cp -r /opt/profilarr/data /opt/profilarr_data_backup
|
cp -r /config /opt/profilarr_config_backup
|
||||||
fi
|
|
||||||
if [[ -f /opt/profilarr/.env ]]; then
|
|
||||||
cp /opt/profilarr/.env /opt/profilarr_data_backup/.env 2>/dev/null || true
|
|
||||||
fi
|
fi
|
||||||
msg_ok "Backed up Data"
|
msg_ok "Backed up Data"
|
||||||
|
|
||||||
@ -59,17 +56,15 @@ function update_script() {
|
|||||||
cd /opt/profilarr/frontend
|
cd /opt/profilarr/frontend
|
||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
|
cp -r dist /opt/profilarr/backend/app/static
|
||||||
fi
|
fi
|
||||||
msg_ok "Built Frontend"
|
msg_ok "Built Frontend"
|
||||||
|
|
||||||
msg_info "Restoring Data"
|
msg_info "Restoring Data"
|
||||||
if [[ -d /opt/profilarr_data_backup ]]; then
|
if [[ -d /opt/profilarr_config_backup ]]; then
|
||||||
mkdir -p /opt/profilarr/data
|
mkdir -p /config
|
||||||
cp -r /opt/profilarr_data_backup/. /opt/profilarr/data
|
cp -r /opt/profilarr_config_backup/. /config/
|
||||||
if [[ -f /opt/profilarr_data_backup/.env ]]; then
|
rm -rf /opt/profilarr_config_backup
|
||||||
cp /opt/profilarr_data_backup/.env /opt/profilarr/.env
|
|
||||||
fi
|
|
||||||
rm -rf /opt/profilarr_data_backup
|
|
||||||
fi
|
fi
|
||||||
msg_ok "Restored Data"
|
msg_ok "Restored Data"
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
"documentation": "https://github.com/Dictionarry-Hub/profilarr#readme",
|
"documentation": "https://github.com/Dictionarry-Hub/profilarr#readme",
|
||||||
"website": "https://github.com/Dictionarry-Hub/profilarr",
|
"website": "https://github.com/Dictionarry-Hub/profilarr",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/profilarr.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/profilarr.webp",
|
||||||
"config_path": "/opt/profilarr.env",
|
"config_path": "/config",
|
||||||
"description": "Profilarr is a configuration management platform for Radarr and Sonarr that simplifies importing, syncing, and managing quality profiles, custom formats, and release profiles.",
|
"description": "Profilarr is a configuration management platform for Radarr and Sonarr that simplifies importing, syncing, and managing quality profiles, custom formats, and release profiles.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -18,7 +18,8 @@ $STD apt install -y \
|
|||||||
build-essential \
|
build-essential \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libssl-dev
|
libssl-dev \
|
||||||
|
git
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
#UV_VERSION="0.7.19"
|
#UV_VERSION="0.7.19"
|
||||||
@ -27,7 +28,7 @@ NODE_VERSION="22" setup_nodejs
|
|||||||
|
|
||||||
msg_info "Creating directories"
|
msg_info "Creating directories"
|
||||||
mkdir -p /opt/profilarr \
|
mkdir -p /opt/profilarr \
|
||||||
/opt/profilarr/data
|
/config
|
||||||
msg_ok "Created directories"
|
msg_ok "Created directories"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "profilarr" "Dictionarry-Hub/profilarr"
|
fetch_and_deploy_gh_release "profilarr" "Dictionarry-Hub/profilarr"
|
||||||
@ -44,15 +45,10 @@ msg_info "Building Frontend"
|
|||||||
cd /opt/profilarr/frontend
|
cd /opt/profilarr/frontend
|
||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
|
cp -r dist /opt/profilarr/backend/app/static
|
||||||
msg_ok "Built Frontend"
|
msg_ok "Built Frontend"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/opt/profilarr.env
|
|
||||||
PROFILARR_HOST=0.0.0.0
|
|
||||||
PROFILARR_PORT=6868
|
|
||||||
PROFILARR_DATA_DIR=/opt/profilarr/data
|
|
||||||
PYTHONUNBUFFERED=1
|
|
||||||
EOF
|
|
||||||
cat <<EOF >/etc/systemd/system/profilarr.service
|
cat <<EOF >/etc/systemd/system/profilarr.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Profilarr - Configuration Management Platform for Radarr/Sonarr
|
Description=Profilarr - Configuration Management Platform for Radarr/Sonarr
|
||||||
@ -62,9 +58,9 @@ After=network.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/profilarr/backend
|
WorkingDirectory=/opt/profilarr/backend
|
||||||
EnvironmentFile=/opt/profilarr.env
|
|
||||||
Environment="PATH=/opt/profilarr/backend/.venv/bin:/usr/local/bin:/usr/bin:/bin"
|
Environment="PATH=/opt/profilarr/backend/.venv/bin:/usr/local/bin:/usr/bin:/bin"
|
||||||
ExecStart=/opt/profilarr/backend/.venv/bin/python -m app.main
|
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
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user