From 4434fbf951d06a721597e805094069477851178e Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sun, 21 Jun 2026 20:26:39 +0900 Subject: feat: standalone build + systemd install (Arch Linux) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bin/build: compiles standalone binaries (dispatch-server + dispatch CLI) via bun build --compile, builds the frontend static bundle with VITE_HTTP_PORT=24991 + VITE_WS_PORT=24990, copies to dist/web/. bin/install: installs binaries to /usr/bin/, frontend to /usr/share/dispatch/web/, systemd service to /etc/systemd/system/, config to /etc/dispatch/env, data dirs to /var/lib/dispatch/ + /var/log/dispatch/. Enables + starts the dispatch systemd service. Supports --uninstall and --no-build flags. systemd/dispatch.service: Type=simple, reads /etc/dispatch/env, restarts on failure, logs to journald. systemd/dispatch.env: template config (ports 24991 HTTP + 24990 WS, DISPATCH_WEB_DIR, API key, data paths). transport-http: optional webDir static file serving — unmatched GET requests fall through to Bun.file() serving with SPA index.html fallback. Gated on DISPATCH_WEB_DIR env var (backward compatible). --- systemd/dispatch.service | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 systemd/dispatch.service (limited to 'systemd/dispatch.service') diff --git a/systemd/dispatch.service b/systemd/dispatch.service new file mode 100644 index 0000000..88e8352 --- /dev/null +++ b/systemd/dispatch.service @@ -0,0 +1,17 @@ +[Unit] +Description=Dispatch AI Agent Server +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/dispatch-server +EnvironmentFile=/etc/dispatch/env +WorkingDirectory=/var/lib/dispatch +Restart=on-failure +RestartSec=5 +# Journal the output +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3