Skip to content

[music] 0.2.0

Choose a tag to compare

@lmdevv lmdevv released this 14 Oct 17:14
· 75 commits to main since this release
f198469

Homelab-ready hardening of [music], plus a round of backend, media, and player fixes.

curl -fsSLO https://raw.githubusercontent.com/lmdevv/music/v0.2.0/deploy/docker/compose.yaml
MUSIC_VERSION=0.2.0 MUSIC_DIR=/path/to/music PUBLIC_URL=http://<host>:8080 docker compose up -d

NixOS: add the flake and set services.music = { enable = true; publicUrl = "…"; musicDirs = [ "/srv/music" ]; };. The module's default image is ghcr.io/lmdevv/music:0.2.0. The CLI is nix run github:lmdevv/music/v0.2.0#cli. See docs/homelab.md and docs/operations.md.

Upgrading from 0.1.0

Change the tag and recreate the container. Before anything else, the container backs up the database to /data/backups/pre-0.2.0-…-from-0.1.0-….zip, then migrates. To go back, restore that backup first with /app/bin/restore <zip>, then start 0.1.0. An older image now refuses to start on data a newer version has migrated, instead of running over it. This upgrade path is tested in CI.

Deploy and homelab (#21, #25)

  • Backup before every upgrade, the newest 5 kept (BACKUP_KEEP), plus a restore helper.
  • Images are published only after every CI check passes. Tags are X.Y.Z, X.Y and latest (amd64 and arm64), and these tags never move to an older build.
  • No service runs as root.
  • The Convex instance secret no longer appears in any process's arguments (ADS-115).
  • /healthz checks Caddy, the media service and the database.
  • Clean docker stop in a few seconds.
  • Starting with TZ set works again.
  • Readable logs.
  • A homelab compose.yaml that works on Docker 20.10+, with reverse-proxy and Tailscale notes.
  • Flake packages.cli.
  • Module options: image, imageFile, pull, autoUpdate, backend, uid/gid, extraEnvironment, and named musicDirs.
  • A NixOS VM test in CI.
  • CLI keys can come from --key-stdin, MUSIC_API_KEY or a hidden prompt. Plain http to a non-local server needs --insecure.
  • CI now runs the security, CLI, media and browser suites that used to be skipped.

Backend (#23)

  • The queue stays consistent across removals and shuffle.
  • Playback position updates read 2 documents instead of about 1,000.
  • Deleting a library is batched and cleans up playlists, likes, plays and queues.
  • Songs whose files went missing show as "Unavailable" rows.
  • Liked songs page past 1,000.
  • Overlapping library folders are refused.
  • A scan that keeps crashing is capped.
  • Daily cleanup.
  • Members' lists page only over the libraries they can read (ADS-112).

Media and player (#24)

  • An empty or unmounted library folder no longer marks the library missing.
  • Renames and moves keep likes, plays and playlist entries.
  • No leaked file handles.
  • The watcher restarts on its own.
  • Replaced and disc-folder cover art is picked up, and unused art is cleaned up.
  • Fixed a transcoder timeout.
  • Expired stream URLs are re-signed, so pausing for 6 hours no longer breaks playback.
  • Recovery when the browser's audio buffer is full.

Known limitations

  • Library and list pages left open across the upgrade error once; reload them.
  • Signed stream URLs stay valid for up to 6 hours after access is removed.