The General page ends with a Version block naming the release this server runs, so an update can be confirmed from the app. The version is COBBLE_VERSION, the release tag the image was built with (Dockerfile ARG, passed by the release workflow, which falls back to package.json's version on a workflow-dispatch build), else package.json's version, which a development server reports too, with (development) after it. runningVersion (src/utils/running-version.ts) drops an unusable version string rather than showing it. Also includes the working tree's pending signup guard in src/pages/__root.server.ts: a user who still holds a session while the install has no users is sent to /auth/logout (and may load it).
3.4 KiB
Releasing Cobble
Cobble ships as a multi-arch container image and a single install.sh.
The repository starts private and is made public at the launch gate below.
One-time setup
GITEA_USERNAMEandGITEA_TOKENare set as GitHub Actions secrets. The token needs package write on the GiteaModuletraceorg.- The Gitea repository exists at
git.tben.me/Moduletrace/cobbleandmainis pushed to both remotes. - The GHCR package is made public after the first image push (Settings > Packages > cobble > Change visibility).
- The Gitea package needs nothing: package visibility follows the
public
Moduletraceorg.
Every release
-
bun run typecheckandbun run testpass locally. -
CI is green on
mainin GitHub Actions. -
bash -n install.shpasses. -
Test the installer on a clean machine, both amd64 and arm64 when possible: - fresh install, signup, one chat reply - rerun with no changes: reports up to date, no restart - update to a new tag: backup taken, data intact -
--uninstallkeeps data,--uninstall --purgeremoves it -
Update the version if the release changes it, including
package.json'sversion(the image reports it on Settings > General when it isn't built from a release tag). -
Tag and publish a GitHub release:
git tag v0.1.0 git push origin main --tags gh release create v0.1.0 --title v0.1.0 --generate-notes -
The release workflow builds
linux/amd64andlinux/arm64and pushes to both registries: -ghcr.io/moduletrace/cobble-git.tben.me/moduletrace/cobble -
Check the manifests:
docker buildx imagetools inspect ghcr.io/moduletrace/cobble:latest docker buildx imagetools inspect git.tben.me/moduletrace/cobble:latest -
Confirm the GHCR package is public and pull it anonymously.
-
Push the tag to Gitea as well:
git push gitea main --tags -
Update every install with the one-liner:
curl -fsSL https://url.moduletrace.com/cobble | sudo bash
Launch gate
Before the first public release:
LICENSE,README.mdandRELEASING.mdare in place.- The installer has been tested on a clean amd64 and a clean arm64 host.
- No secrets are tracked (
git status,git ls-files, secret scanning). - The GitHub repository and the Gitea mirror are set to public.
- The GHCR package is public.
- The first release is installed on the real host and a signup, a chat reply, a computer and a routine have been exercised.
- A plain
curl | bashinstall answers onhttp://<host>:7227, and the same install behind a reverse proxy serves HTTPS, installs the app, gets a live chat socket and can turn on notifications.
Rollback
- Images are tagged with the release version, so an older tag can be
installed with
--version vX.Y.Z. - The installer keeps the last five database backups in
$COBBLE_HOME/backups. Whole-data archives from Settings > Backups live in$COBBLE_HOME/backups-archives; they are kept, not pruned by the installer. - Restore a backup from Settings > Backups in the app: a database snapshot, or a whole-data archive (which replaces every folder, the snapshots included, takes a safety archive first and restarts the app). A snapshot can also be restored with the app stopped.