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:
+12
-10
@@ -2,11 +2,12 @@
|
||||
|
||||
## Complete installer (recommended for both services in Docker)
|
||||
|
||||
Run `./install` from an interactive terminal (Docker is the default;
|
||||
`./install.sh` remains a compatibility alias). It handles Compose
|
||||
Run `./install --docker` from an interactive terminal (Docker is the explicit
|
||||
`--docker`/`docker` mode; `./install.sh` remains a compatibility alias, and a bare
|
||||
`./install` now performs the native host installation). It handles Compose
|
||||
configuration, ntfy users/permissions/token, image build, container skill install,
|
||||
first-time container harness provider login (OpenCode by default; `./install
|
||||
--harness pi` configures Pi and skips OpenCode login), startup, and an
|
||||
--docker --harness pi` configures Pi and skips OpenCode login), startup, and an
|
||||
authenticated test notification. Choose your own provider in the configured
|
||||
harness; signup/login credentials stay in the Docker volume, not your host
|
||||
account. Re-run to update while
|
||||
@@ -80,8 +81,9 @@ are sent until it is filled. `.env`, `secrets/`, and `data/` are git-ignored and
|
||||
excluded from image builds. The container publishes port **8080**; the default
|
||||
host mapping is **8081**, bound to host `0.0.0.0`, avoiding the existing native
|
||||
server on 8080. Query the actual mapped port with
|
||||
`docker compose port pipelines 8080`. Android does not need access to the
|
||||
unauthenticated pipeline API.
|
||||
`docker compose port pipelines 8080`. The unauthenticated pipeline WebSocket API
|
||||
shares that port, so expose it only on a trusted LAN/VPN and never to the public
|
||||
internet.
|
||||
|
||||
Use HTTP only on a trusted LAN or encrypted VPN. For public access, use HTTPS
|
||||
with a reverse proxy/VPN; configure the external URL in `NTFY_BASE_URL`. The
|
||||
@@ -186,8 +188,8 @@ npm, then builds `FROM` the OpenCode image's immutable `sha256` digest and label
|
||||
the built image with the resolved versions, digest and source identity. It fails
|
||||
closed (keeping the last verified Dockerfile fallback pins) rather than guessing or
|
||||
silently substituting a stale pin when discovery, digest resolution, build or
|
||||
compatibility verification fails. A full `./install` always invokes the Docker build
|
||||
for a dirty source and relies on layer caching; a model/login-only reconfiguration
|
||||
rebuilds only when the verified release image identity (versions/digest) no longer
|
||||
matches the resolved releases, so a source change alone does not rebuild on
|
||||
reconfigure.
|
||||
compatibility verification fails. A full `./install --docker` always invokes the
|
||||
Docker build for a dirty source and relies on layer caching; a model/login-only
|
||||
reconfiguration rebuilds only when the verified release image identity
|
||||
(versions/digest) no longer matches the resolved releases, so a source change
|
||||
alone does not rebuild on reconfigure.
|
||||
|
||||
Reference in New Issue
Block a user