* v1.16.0 Signed-off-by: Xe Iaso <me@xeiaso.net> * update packaging docs Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net>
2.7 KiB
title
| title |
|---|
| Building Anubis without Docker |
:::note
These instructions may work, but for right now they are informative for downstream packagers more than they are ready-made instructions for administrators wanting to run Anubis on their servers. Pre-made binary package support is being tracked in #156.
:::
Entirely from source
If you are doing a build entirely from source, here's what you need to do:
:::info
If you maintain a package for Anubis v1.15.x or older, you will need to update your package build. You may want to use one of the half-baked tarballs if your distro/environment of choice makes it difficult to use npm.
:::
Tools needed
In order to build a production-ready binary of Anubis, you need the following packages in your environment:
- Go at least version 1.24 - the programming language that Anubis is written in
- esbuild - the JavaScript bundler Anubis uses for its production JS assets
- Node.JS & NPM - manages some build dependencies
gzip- compresses production JS (part of coreutils)zstd- compresses production JSbrotli- compresses production JS
To upgrade your version of Go without system package manager support, install golang.org/dl/go1.24.2 (this can be done from any version of Go):
go install golang.org/dl/go1.24.2@latest
go1.24.2 download
Install dependencies
make deps
This will download Go and NPM dependencies.
Building static assets
make assets
This will build all static assets (CSS, JavaScript) for distribution.
Building Anubis to the ./var folder
make build
From this point it is up to you to make sure that ./var/anubis ends up in the right place. You may want to consult the ./run folder for useful files such as a systemd unit and anubis.env.default file.
"Pre-baked" tarball
The anubis-src-with-vendor tarball has many pre-build steps already done, including:
- Go module dependencies are present in
./vendor - Static assets (JS, CSS, etc.) are already built in CI
This means you do not have to manage Go, NPM, or other ecosystem dependencies.
When using this tarball, all you need to do is build ./cmd/anubis:
make prebaked-build
Anubis will be built to ./var/anubis.
Development dependencies
Optionally, you can install the following dependencies for development:
- Staticcheck (optional, not required due to
go tool staticcheck, but required if you are using any version of Go older than 1.24)