Files
busbar-designer/deploy
wenil af3ed092dc holder: explicit Render button + progress UI + longer render timeout
- Replace debounced auto-render-on-param-change with an explicit Render
  button. Param changes mark the button "dirty" (accent ring); user clicks
  Render to drive a render. A Cancel button (AbortController) appears
  while a render is in flight.
- Add indeterminate progress bar with elapsed-time counter in the status
  panel. Real OpenSCAD --progress streaming can come later.
- Bump OPENSCAD_TIMEOUT default 60s -> 300s and gunicorn --timeout
  120s -> 300s. The 60s cap was misclassified by the frontend as
  "OpenSCAD not installed" because the error string contained the word
  "openscad" -- which the JS matched too greedily.
- Frontend error classifier now distinguishes "binary not found",
  "timed out", and "geometry empty" cases and only shows the
  install-OpenSCAD hint for the real not-found case.
2026-05-25 11:22:04 +03:00
..
2026-05-24 18:59:50 +03:00

Deploy

Two scripts here, plus the systemd unit.

File Where it runs What it does
install.sh inside a Debian/Ubuntu host Clones the repo, sets up Python venv, installs deps, starts systemd unit.
update.sh inside the LXC/VM/server git pull + refresh Python deps + systemctl restart.
busbar-designer.service systemd Unit file template; install.sh substitutes paths/user/port.

Both scripts are idempotent (safe to re-run) and use only stdlib + Debian-shipped tools.

Want to create the LXC and provision it in one go? See the manual walk-through in the main README.md (Quick start / Deploy section). The earlier proxmox-lxc.sh whiptail helper was removed — the Proxmox web UI + this install.sh are simpler and easier to debug.


Push to your Gitea (one time)

git remote add gitea https://gitea.example.com/me/busbar-designer.git
git push gitea main

If your Gitea uses a self-signed cert, set GIT_SSL_NO_VERIFY=1 (or install the CA into the system trust store).


Inside a Debian / Ubuntu host (LXC, VM, bare)

REPO_URL=https://gitea.example.com/me/busbar-designer.git \
bash -c "$(curl -fsSL https://gitea.example.com/me/busbar-designer/raw/branch/main/deploy/install.sh)"

Defaults: /opt/busbar-designer, user busbar, port 5000. Override with INSTALL_DIR, SVC_USER, PORT.

What it installs:

  • Debian packages: git python3 python3-venv libgl1 libglu1-mesa libxrender1 libxext6 libsm6 libgomp1 openscad xvfb
  • Python venv with build123d, Flask, ezdxf, gunicorn
  • systemd unit (substituted with your paths/user/port)

Updating after git push

From the Proxmox host:

pct exec 210 -- bash /opt/busbar-designer/deploy/update.sh

Or SSH in and:

sudo bash /opt/busbar-designer/deploy/update.sh

Does git fetch + reset --hard on the tracked branch, refreshes Python deps, restarts the service.


Backup & restore

All user data lives in /opt/busbar-designer/data/busbar.db (SQLite, single file).

# Backup (from Proxmox host)
pct exec 210 -- cat /opt/busbar-designer/data/busbar.db > busbar-backup-$(date +%F).db

# Restore
cat busbar-backup-2026-05-24.db | pct exec 210 -- bash -c \
  'systemctl stop busbar-designer && cat > /opt/busbar-designer/data/busbar.db && chown busbar:busbar /opt/busbar-designer/data/busbar.db && systemctl start busbar-designer'

Or use Proxmox's own LXC backup (vzdump) which captures the whole rootfs (slower, captures everything).


Troubleshooting

Symptom Fix
Git clone fails with TLS error Set GIT_SSL_NO_VERIFY=1, or install your Gitea CA cert into /usr/local/share/ca-certificates.
Service starts then dies journalctl -u busbar-designer -n 100. Usually OCP wheel didn't install — check Python version.
/api/holder/render returns 500 which openscad. If missing: apt install -y openscad.
Browser shows 502 / can't connect Check IP with hostname -I. If DHCP, the IP may have changed.
Port 5000 already in use Edit systemd unit: Environment=PORT=5050 and ExecStart=...--bind=0.0.0.0:5050.