Install Pipelines natively by default on macOS and Linux
Add scripts/setup-native.py and make ./install (and --native) build the server, the CLI and ntfy from source into ~/.local/share/pipelines, detect an existing host OpenCode and Pi instead of installing them, install the packaged authoring skill, migrate an existing Docker database and ntfy auth store, save the host client default and start both services. ./install --docker keeps the previous Docker server + ntfy installation unchanged. ntfy is compiled from its pinned Go module on every host because upstream publishes no macOS server binary (its darwin asset is built with -tags noserver); its cgo SQLite driver is why a C compiler is now required natively. The ntfy credential bootstrap and the client default writer are shared by both installers, installation.Load resolves symlinked prefixes, the Docker migration copies the SQLite write-ahead log so the newest definitions and runs are not lost, and the account subcommands read the generated configuration through NTFY_CONFIG_FILE. Verified on macOS: 115 Python tests, go build/vet/test, and scratch installs that migrate 9 pipelines and 31 runs, build ntfy v2.30.0 and start both services healthy on spare ports before stopping them.
This commit is contained in:
@@ -41,17 +41,33 @@ and the executed route highlighted.
|
||||
|
||||
## Install
|
||||
|
||||
`./install` installs **Docker server + ntfy**. Docker is the only supported runtime
|
||||
installation. Setup needs Docker Compose and Python 3.
|
||||
`./install` installs Pipelines **natively on the host by default** (macOS and
|
||||
Linux); `./install --docker` installs the **Docker server + ntfy** explicitly.
|
||||
Native setup detects (but never installs) Go, python3, git, curl and a C compiler
|
||||
(`cc`/`clang`/`gcc`), plus an existing `opencode`/`pi`; it builds `pipelines-server`,
|
||||
`pipelines` and ntfy from source into `~/.local/share/pipelines` (honouring
|
||||
`PIPELINES_PREFIX`) and generates an ntfy configuration mirroring the Docker
|
||||
settings. ntfy is compiled locally because upstream publishes no macOS server
|
||||
binary, and the C compiler is required because its SQLite driver is cgo. Docker
|
||||
setup needs Docker Compose and Python 3 and includes OpenCode/Pi in the persistent
|
||||
server container.
|
||||
For the host CLI/TUI walkthrough below, also install Go 1.27+; the Docker
|
||||
installer installs/updates those clients when host Go is available.
|
||||
|
||||
```sh
|
||||
git clone https://git.a-wan.net/alan/pipelines.git
|
||||
cd pipelines
|
||||
./install # configure/start Docker services and connect a provider
|
||||
./install # native host install (Go, python3, git, curl, cc, opencode)
|
||||
./install --docker # explicit Docker services + container provider login
|
||||
```
|
||||
|
||||
Native setup reuses your existing host OpenCode login and never installs,
|
||||
upgrades or downloads OpenCode/Pi. Start it with
|
||||
`PIPELINES_PREFIX=~/.local/share/pipelines ~/.local/share/pipelines/bin/pipelines start`.
|
||||
When Docker volumes are present it migrates the existing database and ntfy auth
|
||||
store (never overwriting newer native data; use `--replace-data` to opt in). See
|
||||
[installation](docs/install.md) for details.
|
||||
|
||||
The installer requires this Git checkout (including `.git`); a standalone source
|
||||
archive cannot self-install. Without host Go you can still use the
|
||||
Docker-contained TUI/CLI. Run Compose from the checkout with `--project-directory`
|
||||
@@ -91,7 +107,7 @@ preselected and marked `(current)`; typing filters, arrow keys or Tab navigate,
|
||||
Enter confirms, and Esc cancels without changing anything). Model selection
|
||||
performs no inference; only the OpenCode path validates the new-pipeline model
|
||||
with a small real generation (provider charges may apply). Fresh
|
||||
`./install --harness pi` skips OpenCode login and that generation check. Pi has no
|
||||
`./install --docker --harness pi` skips OpenCode login and that generation check. Pi has no
|
||||
standalone `auth login`: setup opens a fresh `/login` session (regular TUI mode)
|
||||
where you choose an authentication method, reuse existing volume credentials by
|
||||
exiting, or sign in with an API key. Each
|
||||
@@ -107,7 +123,8 @@ services: an image matching the release identity needs no rebuild, while a dirty
|
||||
source always invokes the Docker build and relies on layer caching. The built
|
||||
image includes python3 so the installer/verification tests can also run inside
|
||||
the container.
|
||||
Configuration and data remain per-user. No native server installer is offered.
|
||||
Configuration and data remain per-user. The native default installer is described
|
||||
above and in [installation](docs/install.md).
|
||||
|
||||
Docker setup starts the server and saves its client endpoint (the container port
|
||||
is **8080**; only the default host mapping is **8081**). That saved endpoint is
|
||||
@@ -124,9 +141,10 @@ them to the public Internet.
|
||||
|
||||
### Developer/legacy local server (unsupported)
|
||||
|
||||
For developing Pipelines itself or running a previous native setup, an explicit
|
||||
foreground server remains available. This is **not** a supported end-user
|
||||
installation and is not part of Docker setup; fresh databases contain no pipelines:
|
||||
For developing Pipelines itself or running a previous Python-supervised legacy
|
||||
host setup, an explicit foreground server remains available. This is not the
|
||||
native installer and is not part of Docker setup; fresh databases contain no
|
||||
pipelines:
|
||||
|
||||
```sh
|
||||
pipelines serve # foreground developer/legacy server
|
||||
|
||||
Reference in New Issue
Block a user