aboutsummaryrefslogtreecommitdiff
path: root/yeetfile.js
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-03-17 19:33:07 -0400
committerXe Iaso <me@xeiaso.net>2025-03-17 19:33:07 -0400
commit9923878c5c8b68df7f132efd28f76ce5478a1f1a (patch)
treec18dfc413495c09886b0d622a275f142f3e9c333 /yeetfile.js
downloadanubis-9923878c5c8b68df7f132efd28f76ce5478a1f1a.tar.xz
anubis-9923878c5c8b68df7f132efd28f76ce5478a1f1a.zip
initial import from /x/ monorepo
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'yeetfile.js')
-rw-r--r--yeetfile.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/yeetfile.js b/yeetfile.js
new file mode 100644
index 0000000..730e7d1
--- /dev/null
+++ b/yeetfile.js
@@ -0,0 +1,22 @@
+go.install();
+
+["amd64", "arm64"].forEach(goarch => rpm.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://xeiaso.net/blog/2025/anubis",
+ license: "MIT",
+ goarch,
+
+ build: (out) => {
+ // install Anubis binary
+ go.build("-o", `${out}/usr/bin/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`);
+ },
+})); \ No newline at end of file