Add explicit user-service autostart configuration
This commit is contained in:
+37
-3
@@ -45,8 +45,41 @@ selects another database, including an existing one; nothing is imported or move
|
||||
automatically. `pipelines serve --help` prints the actual defaults on your machine.
|
||||
Drafts use the OS user cache; `PIPELINES_DRAFT_DIR` overrides that location.
|
||||
|
||||
Use your OS's normal service manager if you want autostart. Pipelines does not
|
||||
install a second supervisor. Native foreground startup is the default.
|
||||
## Optional autostart
|
||||
|
||||
Stop any existing foreground or legacy server first, then explicitly configure
|
||||
the OS user service:
|
||||
|
||||
```sh
|
||||
pipelines service enable --workspace-root "$HOME"
|
||||
pipelines service status
|
||||
```
|
||||
|
||||
This starts the server now and at subsequent logins. Linux uses
|
||||
`systemctl --user`; macOS uses a LaunchAgent in your user `Library/LaunchAgents`.
|
||||
There is no sudo, Docker dependency, or second supervisor. Choose a narrower root
|
||||
if possible; repeat `--workspace-root` for multiple trusted directories. `--db`
|
||||
and `--addr` select the database/listen address, just like foreground startup.
|
||||
Re-run enable to update the definition and restart with the new settings.
|
||||
|
||||
```sh
|
||||
pipelines service enable --workspace-root "$HOME/repos" --print # preview only
|
||||
pipelines service disable # stop and remove
|
||||
```
|
||||
|
||||
Setup records the current PATH, HOME, XDG directory overrides, selected OpenCode
|
||||
executable, and supported ntfy URL/token-file settings in a private service file.
|
||||
It does not copy provider credentials or the rest of the shell environment.
|
||||
Use `PIPELINES_NTFY_TOKEN_FILE`, not an inline token. Re-run enable after changing
|
||||
these settings or moving binaries. Relative database/token-file paths are resolved
|
||||
at configuration time. Services do not read your shell startup files.
|
||||
|
||||
On Linux this is **login autostart**, not automatically boot-without-login.
|
||||
If needed, explicitly enable lingering using your system's normal administration
|
||||
policy (`loginctl enable-linger "$USER"`). Pipelines does not change that policy.
|
||||
macOS LaunchAgents likewise require a user login. Windows autostart is unsupported.
|
||||
Use `journalctl --user -u pipelines.service` for Linux logs. On macOS inspect
|
||||
`pipelines service status`; run `pipelines serve` in the foreground for diagnostics.
|
||||
|
||||
## OpenCode
|
||||
|
||||
@@ -78,7 +111,8 @@ expose an unauthenticated pipeline server or HTTP credentials to untrusted netwo
|
||||
|
||||
## Uninstall
|
||||
|
||||
Stop the foreground server first, then:
|
||||
Disable autostart with `pipelines service disable` if configured, or stop the
|
||||
foreground server first, then:
|
||||
|
||||
```sh
|
||||
pipelines uninstall
|
||||
|
||||
Reference in New Issue
Block a user