diff options
| author | Adam Malczewski <[email protected]> | 2026-05-22 17:07:31 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-05-22 17:07:31 +0900 |
| commit | 288b21cec98421fda57028a0c8c9d835cfbb14b0 (patch) | |
| tree | 9ce3ec38acdcf7be96e28f1e0d5deccf6b46c917 /packaging | |
| parent | 45a4890031192f4e7409443f98e824dad17ba175 (diff) | |
| download | dispatch-288b21cec98421fda57028a0c8c9d835cfbb14b0.tar.gz dispatch-288b21cec98421fda57028a0c8c9d835cfbb14b0.zip | |
feat: add/remove keys from UI, backend URL setting, user service, Docker fix
- Add POST /models/add-key and POST /models/remove-key API endpoints
- Add 'Add New Key' modal (page-level) with provider selection
- Add remove button per key in Model Status view
- Add configurable backend URL setting in Settings panel with localStorage persistence
- Convert systemd service from system to user service (systemctl --user)
- Fix Docker entrypoint to chown all nested node_modules dirs
- Update dispatch.toml credential paths to use -pro/-max naming
- Make API port configurable via PORT env var (default 3000, prod 18390)
Diffstat (limited to 'packaging')
| -rw-r--r-- | packaging/PKGBUILD | 8 | ||||
| -rw-r--r-- | packaging/dispatch-api.service | 20 | ||||
| -rw-r--r-- | packaging/dispatch.install | 4 |
3 files changed, 5 insertions, 27 deletions
diff --git a/packaging/PKGBUILD b/packaging/PKGBUILD index 57e7e28..de49d4e 100644 --- a/packaging/PKGBUILD +++ b/packaging/PKGBUILD @@ -91,10 +91,10 @@ package() { install -Dm644 dispatch.toml "${optdir}/dispatch.toml" fi - # --- systemd service --- + # --- systemd user service --- install -Dm644 \ "${srcdir}/dispatch-api.service" \ - "${pkgdir}/usr/lib/systemd/system/dispatch-api.service" + "${pkgdir}/usr/lib/systemd/user/dispatch-api.service" # --- Environment config (preserved across upgrades via backup=()) --- install -Dm644 \ @@ -119,10 +119,6 @@ package() { "${srcdir}/dispatch.svg" \ "${pkgdir}/usr/share/icons/hicolor/scalable/apps/dispatch.svg" - # --- sysusers: create the 'dispatch' system user --- - install -Dm644 /dev/null "${pkgdir}/usr/lib/sysusers.d/dispatch.conf" - echo 'u dispatch - "Dispatch API" /var/lib/dispatch' > "${pkgdir}/usr/lib/sysusers.d/dispatch.conf" - # --- License --- if [ -f "${_projectdir}/LICENSE" ]; then install -Dm644 "${_projectdir}/LICENSE" \ diff --git a/packaging/dispatch-api.service b/packaging/dispatch-api.service index ccbb727..120d460 100644 --- a/packaging/dispatch-api.service +++ b/packaging/dispatch-api.service @@ -1,12 +1,8 @@ [Unit] Description=Dispatch API Backend -After=network-online.target -Wants=network-online.target [Service] Type=simple -User=dispatch -Group=dispatch WorkingDirectory=/opt/dispatch ExecStart=/usr/bin/bun packages/api/src/index.ts EnvironmentFile=-/etc/dispatch/dispatch-api.conf @@ -15,19 +11,5 @@ RestartSec=5 StandardOutput=journal StandardError=journal -# Data directory: systemd creates /var/lib/dispatch owned by dispatch:dispatch -StateDirectory=dispatch - -# Tell the app to store its SQLite DB under /var/lib/dispatch/ -Environment=XDG_DATA_HOME=/var/lib - -# Security hardening -ProtectSystem=strict -ProtectHome=true -NoNewPrivileges=true -PrivateTmp=true -PrivateDevices=true -RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX - [Install] -WantedBy=multi-user.target +WantedBy=default.target diff --git a/packaging/dispatch.install b/packaging/dispatch.install index e6db694..7d1439f 100644 --- a/packaging/dispatch.install +++ b/packaging/dispatch.install @@ -3,7 +3,7 @@ post_install() { echo "==> Dispatch has been installed." echo " Edit /etc/dispatch/dispatch-api.conf to configure the API." echo " Then enable and start the service:" - echo " systemctl enable --now dispatch-api" + echo " systemctl --user enable --now dispatch-api" echo "" } @@ -11,6 +11,6 @@ post_upgrade() { echo "" echo "==> Dispatch has been upgraded." echo " You may need to restart the service:" - echo " systemctl restart dispatch-api" + echo " systemctl --user restart dispatch-api" echo "" } |
