Files
busbar-designer/deploy/busbar-designer.service
T
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

44 lines
1.4 KiB
Desktop File

; systemd unit for running busbar-designer in a Proxmox LXC (or any Linux VM)
; without Docker. Assumes the project lives at /opt/busbar-designer and you've
; created a venv there with `python3 -m venv .venv && .venv/bin/pip install -r
; requirements.txt gunicorn`.
;
; Install:
; sudo cp deploy/busbar-designer.service /etc/systemd/system/
; sudo systemctl daemon-reload
; sudo systemctl enable --now busbar-designer
;
; Logs: journalctl -u busbar-designer -f
[Unit]
Description=Busbar Designer (Flask + build123d)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=busbar
Group=busbar
WorkingDirectory=/opt/busbar-designer
Environment=HOST=0.0.0.0
Environment=PORT=5000
Environment=FLASK_DEBUG=0
Environment=PATH=/opt/busbar-designer/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
; HOME points inside the project so ezdxf / matplotlib / build123d can write
; their config + cache while ProtectHome=true still hides the real /home.
Environment=HOME=/opt/busbar-designer/data
Environment=XDG_CONFIG_HOME=/opt/busbar-designer/data/.config
Environment=XDG_CACHE_HOME=/opt/busbar-designer/data/.cache
ExecStart=/opt/busbar-designer/.venv/bin/gunicorn --bind=0.0.0.0:5000 --workers=2 --threads=2 --timeout=300 app:app
Restart=on-failure
RestartSec=5
; Hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/busbar-designer
[Install]
WantedBy=multi-user.target