mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 09:48:08 -04:00

Closes #125 Closes #40 Among other things, this moves all of the asset generation to run within the context of an npm script. Developer documentation stubs have been added so that people can get started more easily. The top-level Dockerfile (which is no longer used in production) has been removed as its presence has been causing confusion. This changeset will break it anyways. These changes will make for less "repo churn" as the static assets are built and rebuilt, at the cost of making the build step more complicated for downstream packagers. If this becomes a burden, we can explore making a "release tarball" that contains pre-massaged outputs.
24 lines
942 B
JavaScript
24 lines
942 B
JavaScript
go.install();
|
|
|
|
["amd64", "arm64"].forEach(goarch => {
|
|
[deb, rpm].forEach(method => method.build({
|
|
name: "anubis",
|
|
description: "Anubis weighs the souls of incoming HTTP requests and uses a sha256 proof-of-work challenge in order to protect upstream resources from scraper bots.",
|
|
homepage: "https://anubis.techaro.lol",
|
|
license: "MIT",
|
|
goarch,
|
|
|
|
build: (out) => {
|
|
// install Anubis binary
|
|
go.build("-o", `${out}/usr/bin/anubis`, "./cmd/anubis");
|
|
|
|
// install systemd unit
|
|
yeet.run("mkdir", "-p", `${out}/usr/lib/systemd/system`);
|
|
yeet.run("cp", "run/anubis@.service", `${out}/usr/lib/systemd/system/anubis@.service`);
|
|
|
|
// install default config
|
|
yeet.run("mkdir", "-p", `${out}/etc/anubis`);
|
|
yeet.run("cp", "run/anubis.env.default", `${out}/etc/anubis/anubis-default.env`);
|
|
},
|
|
}));
|
|
}); |