aboutsummaryrefslogtreecommitdiffstats
path: root/roles/jails/06_hommabot/templates/root_hommabot_deps.sh
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-05-13 00:13:57 +0300
committerJan Tuomi <jan@jantuomi.fi>2026-05-16 18:42:27 +0300
commitb5860daf11ac353049cb1654b9414a129e5cfb96 (patch)
tree87ed89711e4f0e85ace0a97fa123199152c67302 /roles/jails/06_hommabot/templates/root_hommabot_deps.sh
parent4715a28fdcd87440400d17154bfa361d99db29cc (diff)
Rework
Diffstat (limited to 'roles/jails/06_hommabot/templates/root_hommabot_deps.sh')
-rw-r--r--roles/jails/06_hommabot/templates/root_hommabot_deps.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/jails/06_hommabot/templates/root_hommabot_deps.sh b/roles/jails/06_hommabot/templates/root_hommabot_deps.sh
new file mode 100644
index 0000000..25c0e56
--- /dev/null
+++ b/roles/jails/06_hommabot/templates/root_hommabot_deps.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -eux
+cd /root/hommabot
+npm ci
+
+# We need to build the better-sqlite3.node file before running the app
+if [ ! -f build/better_sqlite3.node ]; then (
+ mkdir -p build
+ cd node_modules/better-sqlite3
+ npm run build-release
+ cp build/Release/better_sqlite3.node ../../build/better_sqlite3.node
+)
+fi