Skip to content

Add updater script for non-Docker systemd installs #418

Description

@uefigs139

Problem or Use Case

I run Bambuddy on Debian 12 in an LXC on Proxmox (systemd install, non-Docker).

Updates currently require several manual steps (stop service, git update, pip update, frontend rebuild, restart service). It works, but it is easy to miss a step and it is slower than necessary.

A one-command updater for non-Docker installs would make maintenance much easier and reduce update errors for LXC/systemd users.

Proposed Solution

Add an official updater script for non-Docker installs (for example scripts/update.sh) with this flow:

  1. Stop bambuddy.service
  2. git fetch --prune origin && git reset --hard origin/<branch>
  3. venv/bin/pip install -r requirements.txt
  4. cd frontend && npm ci && npm run build (if frontend exists)
  5. Start service and print status
  6. If update fails, attempt to start the service again

Optional: support env vars for path/service/branch overrides so users can adapt different install layouts.

Alternatives Considered

Manual updates and local custom scripts.

I currently use a local helper script (bbup) that performs the update steps. It works well, but this functionality would be better maintained upstream so users have a standard, documented update path.

Feature Category

Print Archiving

Priority

Nice to have

Mockups or Examples

Summary

Add scripts/update.sh to provide a one-command updater for non-Docker installs (systemd/LXC/bare-metal).

Why

Users running Bambuddy outside Docker currently perform several manual steps to update:

  • stop service
  • pull/reset repo
  • update Python dependencies
  • rebuild frontend
  • restart service

This script standardizes that process and reduces update mistakes.

What this adds

  • scripts/update.sh with:
    • configurable defaults via env vars:
      • INSTALL_DIR (default /opt/bambuddy)
      • SERVICE_NAME (default bambuddy)
      • BRANCH (default main)
      • VENV_PIP (default $INSTALL_DIR/venv/bin/pip)
      • FRONTEND_DIR (default $INSTALL_DIR/frontend)
    • update flow:
      1. stop service
      2. fetch/reset to origin/$BRANCH
      3. install Python deps from requirements.txt
      4. run npm ci && npm run build when frontend exists
      5. start service and show status
    • failure handling: if any step fails, attempts to restart the service

Docs

Adds README section showing:

  • install command for updater script
  • manual run command (bambuddy-update)
  • optional env var overrides

Tested

Tested on:

  • Debian 12 (bookworm)
  • Proxmox LXC
  • systemd service: bambuddy.service
  • install path: /opt/bambuddy

Result:

  • successful update from 38641e9 to ac2aaaa
  • Python deps updated
  • frontend build completed
  • service restarted and running

Contribution

  • I would be willing to help implement this feature

Checklist

  • I have searched existing issues to ensure this feature hasn't already been requested

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions