summaryrefslogtreecommitdiffhomepage
path: root/systemd/dispatch.env
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-21 20:26:39 +0900
committerAdam Malczewski <[email protected]>2026-06-21 20:26:39 +0900
commit4434fbf951d06a721597e805094069477851178e (patch)
tree4d3103ccb0512ff77d9d472d7b4178c11c8b73b3 /systemd/dispatch.env
parentac69e5f8bea9377887a6f89ff362c6be0db1c874 (diff)
downloaddispatch-4434fbf951d06a721597e805094069477851178e.tar.gz
dispatch-4434fbf951d06a721597e805094069477851178e.zip
feat: standalone build + systemd install (Arch Linux)
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).
Diffstat (limited to 'systemd/dispatch.env')
-rw-r--r--systemd/dispatch.env29
1 files changed, 29 insertions, 0 deletions
diff --git a/systemd/dispatch.env b/systemd/dispatch.env
new file mode 100644
index 0000000..37887cb
--- /dev/null
+++ b/systemd/dispatch.env
@@ -0,0 +1,29 @@
+# /etc/dispatch/env — Dispatch server configuration (systemd EnvironmentFile)
+# Copy this to /etc/dispatch/env and fill in the values.
+
+# ─── Ports ───────────────────────────────────────────────────────────────────
+# Backend HTTP (serves API + frontend static files)
+BACKEND_PORT=24991
+# Surface WebSocket (frontend live updates + surfaces)
+SURFACE_WS_PORT=24990
+
+# ─── Frontend ────────────────────────────────────────────────────────────────
+# Directory containing the built frontend static files (served by the backend)
+DISPATCH_WEB_DIR=/usr/share/dispatch/web
+
+# ─── Provider (OpenCode Go / OpenAI-compatible) ──────────────────────────────
+DISPATCH_API_KEY=sk-...
+DISPATCH_BASE_URL=https://opencode.ai/zen/go/v1
+DISPATCH_MODEL=deepseek-v4-flash
+
+# ─── Umans provider (optional, set key to enable) ────────────────────────────
+# UMANS_API_KEY=sk-...
+
+# ─── Data paths ──────────────────────────────────────────────────────────────
+DISPATCH_DB=/var/lib/dispatch/dispatch.db
+DISPATCH_TRACE_DB=/var/lib/dispatch/traces.db
+DISPATCH_JOURNAL=/var/log/dispatch/app.ndjson
+
+# ─── Observability ───────────────────────────────────────────────────────────
+# Trace DB path (defaults to ./traces.db if unset)
+# DISPATCH_TRACE_DB=/var/lib/dispatch/traces.db