diff options
Diffstat (limited to 'systemd')
| -rw-r--r-- | systemd/dispatch.env | 29 | ||||
| -rw-r--r-- | systemd/dispatch.service | 17 |
2 files changed, 46 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 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 |
