silverbullet icon indicating copy to clipboard operation
silverbullet copied to clipboard

Move to single-binary distributions for server

Open zefhemel opened this issue 2 years ago • 6 comments

deno bundle which current produces the silverbullet.js bundle is deprecated, while deno compile (which produces single binaries you can run without having Deno installed) has gained some features that were previously missing (such as Worker support) and SB required.

The plan is to migrate away from deno bundle and to produce platform-specific builds for SilverBullet server using deno compile. I'm happy to do this anyway, because I had to do a fair bit of hacking to get deno bundle to actually bundle everything it needed and this would clean some of that up.

What needs to happen:

  • [x] Make SB actually work with deno compile it doesn't on main
  • [x] Create a new installer script (to replace the deno run ... line on the website right now) that determines the OS and architecture and downloads the appropriate zip file and extracts it locally
  • [ ] Update the silverbullet upgrade command to replace itself with a newer version when available
  • [x] Update the latest silverbulllet.js on silverbullet.md to describe how to perform upgrades in the future.
  • [x] Update the Desktop builds to also use the deno compile based binary, rather than running deno as a sub-process and distribute/sign it with the desktop distribution
  • [ ] Update Docker build
  • [x] Update the documentation on how to install SilverBullet server

Beside reducing some technical debt, the cool thing is that regular users no longer need to install Deno at all. They will be able to run a single curl | sh style command to install SB and don't need to install and manage Deno separately.

zefhemel avatar May 06 '23 17:05 zefhemel

Work is currently in progress in the compile branch

zefhemel avatar May 06 '23 17:05 zefhemel

Sadly I have to put this on hold due to this blocker: https://github.com/denoland/deno/issues/11154 which makes it impossible to create signed Mac desktop builds based on this new model. Reverted all the commits on main and keeping this work on the compile branch for now.

zefhemel avatar May 07 '23 08:05 zefhemel

Since there's now no need to sign anything anymore (since dropping the desktop app), this is unblocked. Question is still: do we want it?

zefhemel avatar May 25 '23 19:05 zefhemel

Well, I am just seeing SilverBullet for the first time today, but yes, I would love to see this.

Install failed at my locked-down corporate environment. I got deno running, but had trouble with loading SB's NPM dependencies.

I single executable is always easier.

CrossEye avatar Jun 30 '23 14:06 CrossEye

A full transition is blocked because we need to figure out how to build ARM64 Linux builds, which Deno doesn't natively support. Maybe doing this inside an ARM64 docker image is an option.

zefhemel avatar Aug 09 '23 07:08 zefhemel

It's now possible to build for Linux arm in deno. So this one's unblocked again.

zefhemel avatar Mar 03 '24 06:03 zefhemel