d8cb0dc06d
Web tool for designing nickel/copper busbars over cylindrical-cell battery packs (21700, 18650) in hex holders. Flask + build123d backend exports STEP/DXF/SVG; vanilla JS frontend with live preview, multi-project SQLite persistence, snapshot history. Deploy scripts in deploy/ (proxmox-lxc.sh, install.sh, update.sh).
39 lines
1.1 KiB
Desktop File
39 lines
1.1 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
|
|
ExecStart=/opt/busbar-designer/.venv/bin/gunicorn --bind=0.0.0.0:5000 --workers=2 --threads=2 --timeout=120 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
|