Deploy rearchitected MusicMouse backend + web frontend
The app grew a python-backend/ and a web/ frontend, so pi_musicmouse no longer matches it. Rework the role: - Install a pinned uv and build the venv with Python 3.13; Raspbian Bookworm's python3 is 3.11 and the backend uses PEP 695 syntax. - pip install python-backend/ instead of a requirements.txt, and take the systemd unit straight from the checkout so it can't drift. - Build web/ on the control machine (no npm on the Pi) and rsync web/dist over. Chain the checkout -> install -> build -> sync -> restart steps through handlers so a run with no repo change does nothing. - Per-host config files (config-<host>.yml); the schema now differs between a host with a real mouse and a display-only one. - Version to deploy is per host (musicmouse_version), no default. Add pi_kiosk: autologin user running startx with Firefox in kiosk mode and no window manager, for a Pi with a monitor attached. Enabled by mediapi_has_monitor, defaulting off. Turn musicdolphin into a display-only instance: serial and audio simulated, driven entirely through the kiosk page. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
15
roles/pi_musicmouse/defaults/main.yml
Normal file
15
roles/pi_musicmouse/defaults/main.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
pi_musicmouse_repo: "ssh://git@git.bauer.tech:2222/martin/musicmouse.git"
|
||||
# No default on purpose: which tag/branch to run is a per-host decision, set in host_vars.
|
||||
# musicmouse_version: "rearchitect-backend"
|
||||
|
||||
pi_musicmouse_python_version: "3.13"
|
||||
pi_musicmouse_uv_version: "0.12.10"
|
||||
|
||||
# Where to check out the repo on the *control machine* to build the frontend (npm isn't
|
||||
# installed on the Pi - see README). Keyed by version so different hosts on different
|
||||
# versions don't clobber each other's build.
|
||||
pi_musicmouse_build_cache: "/tmp/musicmouse-build-cache"
|
||||
|
||||
# Which files/config-*.yml to install as this host's /media/musicmouse/config.yml.
|
||||
pi_musicmouse_config_file: "config-{{ inventory_hostname }}.yml"
|
||||
Reference in New Issue
Block a user