Build the web UI into the .deb

- Package discover/dist to /usr/share/playlistd/discover, and serve it
  from there in the default config. cargo deb refuses to package if the
  UI hasn't been built, rather than shipping without it.
- Install a pinned Node.js (22.23.4, checksum-verified) in the
  Containerfile; Ubuntu 22.04's is too old for Vite. The README's build
  command now builds the UI first.
- Recommend yt-dlp, for playing suggested songs from YouTube.
- If discover.ui points to a missing directory, warn instead of letting
  Rocket panic at startup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018opPJMJjLWr4RqdG6vuK6p
This commit is contained in:
Claude committed 2026-11-14 10:02:25 +00:00
1 parent 4031ec7c08
commit 77f9f29cc6
5 files changed
+41 -10

No files matched your search

+5
View File
@@ -26,8 +26,13 @@ tokio-util = { version = "0.7", features = ["io"] }
[package.metadata.deb]
depends = "$auto"
# plays suggested songs from YouTube. Distribution packages may be too old to work with YouTube,
# so it's only recommended: a current yt-dlp from elsewhere (e.g. pip) works too
recommends = "yt-dlp"
assets = [
["target/release/playlistd", "usr/bin/playlistd", "755"],
# the web UI; build it first with `npm --prefix discover ci && npm --prefix discover run build`
["discover/dist/**/*", "usr/share/playlistd/discover/", "644"],
["etc/playlistd/playlistd.toml", "etc/playlistd/playlistd.toml", "600"],
["etc/playlistd/Rocket.toml", "etc/playlistd/Rocket.toml", "600"],
]