mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-03 16:15:54 +00:00
Spoolman: move to uv (#11121)
This commit is contained in:
@@ -28,6 +28,8 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PYTHON_VERSION="3.14" setup_uv
|
||||||
|
|
||||||
if check_for_gh_release "spoolman" "Donkie/Spoolman"; then
|
if check_for_gh_release "spoolman" "Donkie/Spoolman"; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop spoolman
|
systemctl stop spoolman
|
||||||
@@ -42,8 +44,10 @@ function update_script() {
|
|||||||
|
|
||||||
msg_info "Updating Spoolman"
|
msg_info "Updating Spoolman"
|
||||||
cd /opt/spoolman
|
cd /opt/spoolman
|
||||||
$STD pip3 install -r requirements.txt
|
$STD uv sync --locked --no-install-project
|
||||||
|
$STD uv sync --locked
|
||||||
cp /opt/spoolman_bak/.env /opt/spoolman
|
cp /opt/spoolman_bak/.env /opt/spoolman
|
||||||
|
sed -i 's|^ExecStart=.*|ExecStart=/usr/bin/bash /opt/spoolman/scripts/start.sh|' /etc/systemd/system/spoolman.service
|
||||||
msg_ok "Updated Spoolman"
|
msg_ok "Updated Spoolman"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
|
|||||||
@@ -17,27 +17,22 @@ update_os
|
|||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
libpq-dev
|
libpq-dev \
|
||||||
|
libffi-dev
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up Python3"
|
|
||||||
$STD apt install -y \
|
|
||||||
python3-dev \
|
|
||||||
python3-setuptools \
|
|
||||||
python3-wheel \
|
|
||||||
python3-pip
|
|
||||||
msg_ok "Setup Python3"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "spoolman" "Donkie/Spoolman" "prebuild" "latest" "/opt/spoolman" "spoolman.zip"
|
fetch_and_deploy_gh_release "spoolman" "Donkie/Spoolman" "prebuild" "latest" "/opt/spoolman" "spoolman.zip"
|
||||||
|
PYTHON_VERSION="3.14" setup_uv
|
||||||
|
|
||||||
msg_info "Setting up Spoolman"
|
msg_info "Setting up Spoolman"
|
||||||
cd /opt/spoolman
|
cd /opt/spoolman
|
||||||
$STD pip3 install --upgrade --ignore-installed -r requirements.txt
|
$STD uv sync --locked --no-install-project
|
||||||
|
$STD uv sync --locked
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
msg_ok "Setup Spoolman"
|
msg_ok "Setup Spoolman"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<'EOF' >/etc/systemd/system/spoolman.service
|
cat <<EOF >/etc/systemd/system/spoolman.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Spoolman
|
Description=Spoolman
|
||||||
After=network.target
|
After=network.target
|
||||||
@@ -46,7 +41,7 @@ After=network.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/opt/spoolman
|
WorkingDirectory=/opt/spoolman
|
||||||
EnvironmentFile=/opt/spoolman/.env
|
EnvironmentFile=/opt/spoolman/.env
|
||||||
ExecStart=uvicorn spoolman.main:app --host "${SPOOLMAN_HOST}" --port "${SPOOLMAN_PORT}"
|
ExecStart=/usr/bin/bash /opt/spoolman/scripts/start.sh
|
||||||
Restart=always
|
Restart=always
|
||||||
User=root
|
User=root
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user