summaryrefslogtreecommitdiff
path: root/scripts/deploy
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-05 17:42:02 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-05 17:42:02 +0000
commit2bbae7416274ef83a6b1d0f9e6101814f0d15ad1 (patch)
treef833f0f780ae5fbd4a9ff2234b2eb75090c1c762 /scripts/deploy
parentf7c6de4f99649dfa19c6b20b5a3fb344c4f8e82c (diff)
scripts: add debug-execution and deploy
debug-execution: inspect a failed execution by ID prefix from prod DB. deploy: build and restart the claudomator systemd service. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'scripts/deploy')
-rwxr-xr-xscripts/deploy26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/deploy b/scripts/deploy
new file mode 100755
index 0000000..a17b1ab
--- /dev/null
+++ b/scripts/deploy
@@ -0,0 +1,26 @@
+#!/bin/bash
+# deploy — Build and deploy claudomator to /site/doot.terst.org
+# Usage: ./scripts/deploy
+# Example: sudo ./scripts/deploy
+
+set -euo pipefail
+
+FQDN="doot.terst.org"
+SITE_DIR="/site/${FQDN}"
+BIN_DIR="${SITE_DIR}/bin"
+SERVICE="claudomator@${FQDN}"
+REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)"
+
+echo "==> Building claudomator..."
+cd "${REPO_DIR}"
+go build -o "${BIN_DIR}/claudomator" ./cmd/claudomator/
+
+echo "==> Fixing permissions..."
+chown www-data:www-data "${BIN_DIR}/claudomator"
+chmod +x "${BIN_DIR}/claudomator"
+
+echo "==> Restarting service..."
+systemctl restart "${SERVICE}"
+systemctl status "${SERVICE}" --no-pager -l
+
+echo "==> Done!"