Deploying a cantare songbook¶
This covers deploying a consumer songbook (the package path) as a static
site. The build emits a plain dist/ directory of HTML/CSS/JS plus a Pagefind
search index — any static host works.
What you need¶
A repo containing:
package.jsonwithcantareas a dependency (seeexamples/consumer/)cantare.config.json— name, description, url, locale, optional themesongs/— your.chofiles
Build command¶
- Output / publish directory:
dist - Node: 20+ (whatever your host's static/Nixpacks image provides)
- No
mise, noaube, no environment variables required on the consumer side — the CLI resolves everything (songs dir, config, output) from the repo.
Coolify (Nixpacks static)¶
- New resource → your Git repository.
- Build pack: Nixpacks (static).
- Install/Build command:
npm ci && npx cantare build ./songs - Publish directory:
dist - Deploy. Coolify serves the static
dist/output; Pagefind search runs entirely client-side, so no server runtime is needed.
Notes¶
npm cirequires a committedpackage-lock.json. Runnpm installonce locally and commit the lockfile.- Installing
cantarefrom git pulls the engine and its dependencies (Astro, ChordSheetJS, Pagefind, chord data); the build needs no extra setup. - Pin the engine to a tag (
github:fancysnake/cantare#v0.4.0).npm cibuilds the commit in the lockfile, so an unpinned dependency does not drift — it freezes, silently, at whatevermainwas on the day you installed. - To bump it, name the new spec explicitly
(
npm install cantare@github:fancysnake/cantare#vX.Y.Z), commit the updated lockfile, and redeploy — there is no code to merge. See Pin the version, and force the upgrade.