# pi_musicmouse Deploys the MusicMouse backend (`python-backend/`) and its built web frontend. - Checks out `musicmouse_version` (a tag or branch - set per host in `host_vars`, no default) from `musicmouse_repo` to `/opt/musicmouse`. - Installs a pinned `uv` release and uses it to create `/opt/musicmouse/.venv` with Python `pi_musicmouse_python_version` (the backend needs 3.12+ for PEP 695 syntax; Raspbian Bookworm's apt python3 is only 3.11) and `pip install` the backend into it. - Builds the frontend (`web/`) on the *control machine* (delegated to `localhost`, not the Pi - no Node/npm is installed on the Pi) and syncs `web/dist` over. - Installs `/media/musicmouse/config.yml` from `files/config-.yml` (one file per host - the schema differs between a host with a real mouse attached and a display-only one; see those files' own comments) and the systemd unit copied straight from the checked-out repo's `python-backend/musicmouse.service`, so it can never drift from what's actually in the app repo. - Sets up a Samba share of `/media/musicmouse` for copying music onto the device. Manual steps after a first deploy: set the Samba password with `smbpasswd`, and copy music into `/media/musicmouse` (or via the Samba share).