mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-24 21:27:16 +02:00
Run Borg-UI with a single gunicorn worker (#17445)
This commit is contained in:
committed by
GitHub
parent
e11a07c197
commit
ab57fd7f94
@@ -32,6 +32,14 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if grep -q -- '--workers 2' /etc/systemd/system/borg-ui.service 2>/dev/null; then
|
||||||
|
msg_info "Reducing Service to a single worker"
|
||||||
|
sed -i 's/--workers 2/--workers 1/' /etc/systemd/system/borg-ui.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl try-restart borg-ui
|
||||||
|
msg_ok "Reduced Service to a single worker"
|
||||||
|
fi
|
||||||
|
|
||||||
if check_for_gh_release "borg-ui" "karanhudia/borg-ui"; then
|
if check_for_gh_release "borg-ui" "karanhudia/borg-ui"; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop borg-ui
|
systemctl stop borg-ui
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ Type=simple
|
|||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/borg-ui
|
WorkingDirectory=/opt/borg-ui
|
||||||
EnvironmentFile=/opt/borg-ui/.env
|
EnvironmentFile=/opt/borg-ui/.env
|
||||||
ExecStart=/opt/borg-ui/.venv/bin/gunicorn app.main:app --bind 0.0.0.0:8081 --workers 2 --worker-class uvicorn.workers.UvicornWorker --timeout 300
|
ExecStart=/opt/borg-ui/.venv/bin/gunicorn app.main:app --bind 0.0.0.0:8081 --workers 1 --worker-class uvicorn.workers.UvicornWorker --timeout 300
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user