pstack

package
v0.46.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT, MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

preview-stacks

A control plane for ephemeral preview stacks, driven by a CLI. You describe the isolation axes a preview needs — a database branch, a queue namespace, images, DNS — and pstack provisions them, runs your Compose stack, tears it all down in reverse, and then proves nothing leaked.

PR=123 pstack up        # provision axes in order, then compose up
PR=123 pstack down      # compose down (all profiles) → destroy axes in reverse → verify
PR=123 pstack verify    # assert every axis is gone; exit 2 if anything survived

The control-plane model

One host runs three layers, and which layer something is decides what may be done to it:

  host  ──  pstack init  ──▶  CONTROL stack:  traefik + pstack (API + UI)
                                              control.<domain>   the web UI
                                              api.<domain>       the API
                                                        │ manages
                                    ┌───────────────────┴───────────────────┐
                                    ▼                                       ▼
                          SHARED deployments                      ISOLATED deployments
                          kind: shared                            kind: isolated
                          <service>.<domain>        ◀── requires ──  <surface>-pr-<n>.<domain>
                          a DB, a queue, a mirror                  pr-123, pr-124, …
                          no axes · `down` guarded              axes · proven gone on `down`
control shared isolated
Managed by the CLI, on the host the API or the CLI the API or the CLI
Hostnames control.<domain> (UI) · api.<domain> (API) <service>.<domain> <surface>-pr-<n>.<domain>
Axes n/a none allowed yes — that is the point
down not offered refused unless forced routine

control. and api. are two routers onto the same container — the API process serves the UI too. The UI then calls the API with relative /api/… paths, so a page loaded from control.<domain> talks to control.<domain>/api/…: same origin, no CORS preflight, nothing to reconfigure if the domain changes. api.<domain> exists to give CI, curl and scripts an honest name that is not "the UI host". Per-PR hostnames are flat and dash-separated (backend-pr-1.<domain>, not backend.pr-1.<domain>) because a wildcard matches exactly one label.

The CLI owns the control stack; the API owns everything else. The API must never run up on the deployment containing the API — the process performing the upgrade is inside the stack being replaced, so it is killed mid-operation, and a bad image leaves the host with no control plane and no remote way to fix it. pstack init / pstack upgrade handle that from the host instead.

Full rationale, the registry contract, and the trust boundary: docs/control-plane.md.

TLS: HTTP-01 by default, DNS-01 when you outgrow it

pstack init --domain … --acme-email … needs no DNS credential. Traefik proves the domain over HTTP-01, on port 80. DNS-01 is opt-in: --challenge dns01 --dns-provider <lego-code>.

HTTP-01 (default) DNS-01 (--challenge dns01)
Credential to obtain, store, rotate none — but port 80 must be reachable from the internet. That is the one hard requirement. a DNS API token (--dns-provider); route53/gcloud are tokenless, satisfying lego from the instance's own identity
Wildcard no — Let's Encrypt does not issue wildcards over HTTP-01, so every hostname gets its own certificate yes — one *.<domain> covers every present and future host
Cert before the stack is deployed no — the challenge needs a router/container already answering on that hostname, so a preview URL is not valid until it is deployed yes — the wildcard is valid immediately
Practical PR ceiling Let's Encrypt allows ~50 new certificates per registered domain per week. At 3 surfaces per PR (backend/frontend/admin): 50 ÷ 3 ≈ 16 new PRs per week before issuance starts failing. (The separate duplicate-certificate limit is 5/week, and bites on re-issuing the same hostname set. Renewals count against neither.) no per-PR issuance, so no ceiling

Start on HTTP-01; move to DNS-01 when PR volume or pre-deploy URLs demand it. Both modes want the wildcard DNS record (*.<domain> + apex) so any per-PR host resolves — HTTP-01 changes what gets certified, not what resolves. The per-PR router labels differ between the two modes, and getting that wrong is what burns the rate limit: see docs/control-plane.md.

Status: kind, requires, the shared down guard, the deployment registry, the registry-backed API (/api/deployments/*), pstack init (both challenge modes) and the released binary are all wired and reachable from the CLI. Everything has been exercised against --dry-run, the API end-to-end, and the built artifact; nothing has been run against a real Docker host yet — docs/control-plane.md tracks the model.

Why this exists

Self-hosted PaaSes already run a Compose file per PR and terminate TLS — Coolify, Dokploy, Uffizzi all do that well, and if that is all you need, use one of them. This is not a PaaS and does not want to be.

What they don't model is the stateful resources a preview needs around the containers:

  • a database branch per PR, provisioned through a SaaS API, deleted-and-recreated rather than reused (a reused branch carries the previous commit's migrations)
  • a queue/workflow namespace per PR on a shared cluster, because task-queue names are often compiled into the app and can't be overridden per deploy
  • per-PR images, which docker compose down -v never removes
  • build-time-baked config — a Next.js app with the backend URL compiled in needs its per-PR value as a build arg, not a runtime env var

Every team hand-rolls these as ad-hoc CI steps, and every hand-rolled version leaks, because the scripts implement destroy and skip verify. pstack makes the axes declarative and makes the leak check a first-class command.

The spec

version: 1
kind: isolated             # `isolated` (default) = one tenant · `shared` = a host singleton
stack: pr-${PR}            # → compose project name, hostname label, and $STACK in every hook

env:
  PREVIEW_DOMAIN: preview.example.com

compose:
  file: docker-compose.preview.yml
  profiles: [backend, frontend]   # up enables these; down enables ALL of them
  subdomains: [backend]           # *.backend-<stack>.<domain> → backend, via ${PSTACK_WILD_BACKEND}

requires:                  # checked BEFORE anything is created — fails by name, not deep in a hook
  - name: ingress-network
    assert: docker network inspect preview-ingress >/dev/null 2>&1
    hint: bring the shared deployment up first

axes:                      # provisioned top→bottom, destroyed bottom→top
  - name: database
    up: |
      ./hooks/db.sh recreate "$STACK"
      echo "DATABASE_URL=$(./hooks/db.sh url "$STACK")"   # KEY=VALUE is captured into compose env
    assert_live: ./hooks/db.sh exists "$STACK"            # exit 0 ⇒ exists  (fail fast on up)
    down:        ./hooks/db.sh delete "$STACK"            # best-effort
    assert_gone: "! ./hooks/db.sh exists \"$STACK\""      # exit 0 ⇒ gone    (the leak gate)

See examples/preview.yml for a fully-commented four-axis stack, and examples/shared.yml for a kind: shared singleton.

kind, and why it is explicit

kind: shared marks a host singleton — a database, a queue cluster, a registry mirror. It may declare no axes (a hard error if it does: axes exist to isolate one tenant from another and to prove a tenant's resources are gone, and a singleton has neither concern), and its down is refused without --force, because compose down -v there destroys the TLS store, the shared database, the admin credentials — state every other deployment depends on.

The kind is declared rather than inferred from "does it have axes", because that guard is load-bearing: an isolated deployment that forgot its axes must not silently inherit a singleton's protection.

The four hooks
Hook Contract On failure
up provision; must be idempotent (re-run on every redeploy) fatal — stops the run
assert_live exit 0 ⇒ resource exists fatal — catches a provision that lied
down destroy recorded, never fatal
assert_gone exit 0 ⇒ resource is gone fatal for verify (exit 2)

The one idea: down is best-effort, verify is strict

This asymmetry is the whole design.

down never aborts. A resource may already be gone, an API may flake, a network may be busy. Stopping halfway leaves more garbage than continuing, so every failure is recorded and teardown carries on.

verify refuses to be optimistic. It asserts each axis is actually gone and exits non-zero if not. An axis with no assert_gone is reported unverifiable rather than passing silently, so a green verify means "everything that can be checked was checked".

Two leak classes it catches out of the box:

  • down omitting a profile. Compose treats a non-enabled profile's services as absent, so tearing down with fewer profiles than you deployed leaves that profile's resources — most visibly one dead <stack>_default network per PR, forever. pstack down always passes every profile in the spec.
  • Images. down -v removes containers, volumes and networks but never images, so per-PR layers accumulate until the disk fills — and disk pressure evicts the warm build cache, which is the real per-PR speed lever. That's an axis, not compose's job.

Install

One static binary (Go), Linux and macOS, amd64 and arm64 — no runtime, no dependencies:

curl -fsSL https://github.com/samishal1998/preview-stacks/releases/latest/download/install.sh | sh
pstack --help

The installer verifies the download against the release's checksums.txt and moves the binary into /usr/local/bin (PSTACK_INSTALL_DIR relocates, PSTACK_VERSION pins). The web UI, the share page, the control-stack compose template and the cloud-init template are embedded in the binary, so nothing is read from a path relative to a source tree at runtime. See docs/control-plane.md.

Until 0.28.0 this was the npm package @samyx/preview-stacks on Bun; that package is deprecated and stops there. An existing host takes the one-time move in docs/usage.md §9.

Contributing

Working from a checkout is the contributor path, not the user path:

git clone https://github.com/samishal1998/preview-stacks && cd preview-stacks
go build -o packages/pstack/bin/pstack ./packages/pstack/cmd/pstack
packages/pstack/bin/pstack --help

The web UI

Every install has one: the API embeds a basic UI and serves it on any non-/api path, so there is no extra container and nothing that can drift from the API it talks to.

An advanced SPA is available opt-in, as its own container:

pstack build-image --ui          # nginx around the published UI package, fetched in the build
pstack init --ui advanced        # adds the container, repoints control.<domain> at it

--ui hearth is the same on Hearth UI (pstack build-image --ui hearth, pstack ui hearth).

The API keeps serving the basic UI on api.<domain> either way, so a missing or broken advanced image degrades to a working interface rather than none.

Usage

pstack <up|down|verify|status|validate|init|serve> [flags]

  -f, --file <path>   spec file (default: preview.yml)
  -n, --dry-run       print what would run, change nothing
  -v, --verbose       echo commands and their output
  -q, --quiet         suppress per-step chatter
      --set K=V       override/define a variable (repeatable)
      --no-verify     down: skip the post-teardown leak check
      --force         down: allow tearing down a `kind: shared` deployment

init flags: --domain <preview.example.com>  --acme-email <you@example.com>
            --challenge http01|dns01        (default http01 — no DNS credential needed)
            --dns-provider <lego-code>      (dns01 only; token via PSTACK_DNS_TOKEN)

serve env:  PSTACK_TOKEN (required to bind off-loopback) · PSTACK_PORT (7878)
            PSTACK_HOST (127.0.0.1) · PSTACK_DATA (/var/lib/pstack)

Exit: 0 ok · 1 failed · 2 leaked · 3 bad spec/usage

init and serve are the control-plane commands: they act on the host and on the registry, so neither needs a preview.yml to be present.

pstack validate also lints your asserts, which is where the tool earns its keep:

! axis "queue": `assert_gone` is a bare `! <probe>` with no reachability guard — it will
  report "gone" if the probe itself fails. Fail closed instead:
      <probe-is-usable> || exit 1
      ! <probe-for-this-resource>

That mistake is the reason homegrown teardown checks lie: ! docker exec … exits 0 when docker itself is missing, so "I could not tell" is reported as "it is gone". validate also flags || true inside an assert (which makes it unable to ever fail) and any axis with up but no assert_gone.

2 is distinct from 1 on purpose: "torn down but something survived" and "teardown errored" are different problems with different owners, and CI should be able to tell them apart.

Start with --dry-run. It prints every command in order without executing any of them, which is also the fastest way to check your axis ordering.

In CI
- run: pstack up                       # on the deploy path
- run: pstack down                     # on PR close — fails the job if anything leaked
- run: pstack verify                   # or as a nightly sweep across stacks

Design decisions

  • Hooks are shell strings, not a plugin API. This tool orchestrates other people's CLIs (docker, gcloud, curl, psql); a structured interface would just move quoting into YAML. The spec lives in your repo at the same trust level as a CI workflow — it is not a sandbox boundary, and this tool is not safe to point at untrusted specs.
  • Interpolation happens exactly once, at parse time, so a value containing ${...} can never be re-expanded downstream.
  • An undefined variable is a hard error. Expanding pr-${PR} to pr- when PR is unset gives every PR the same stack — collision instead of isolation. Failing loudly is the only safe default.
  • Axis order is declaration order, reversed on teardown. Declare dependencies before dependents.
  • No state store. The stack identity is derived from ${PR}, and truth lives in Docker and in each axis's own assert_* probe. Nothing to get out of sync, nothing to migrate.

API and UI

pstack serve exposes the same core over HTTP, plus a small Vue UI for submitting, monitoring and tearing down stacks from a browser.

PSTACK_TOKEN=$(openssl rand -hex 16) PSTACK_HOST=0.0.0.0 pstack serve

Because up/down take minutes, mutating routes are asynchronous: a POST returns 202 with a job id, and you poll GET /api/jobs/:id or subscribe to GET /api/jobs/:id/stream (SSE). One job per stack at a time — a concurrent request gets 409 rather than being queued, because a down racing an up over the same database branch is corruption, not contention.

Route Purpose
GET /api/health liveness; auth mode, data dir, version
GET /api/deployments every submitted deployment, with busy and running
GET/PUT/DELETE /api/deployments/:id read · submit or replace ({spec, compose?, env?}) · forget (refused while containers exist)
POST /api/deployments/:id/{up,down,verify} start a job → 202 {job} / 409 if busy. down body: {verify?, force?}
POST /api/deployments/:id/{sleep,wake} compose project down with volumes and axes kept → 202 {job}; wake is up. A request to a sleeping stack's hostname wakes it too
POST /api/deployments/:id/share a read-only link (details, logs) to this one deployment — a JWT, no account needed
GET /api/swarm · GET /api/swarm/join?format=… the swarm's nodes · what a new worker runs (token, command, script, cloud-config)
GET /api/auth/sso/{start,callback} · GET/PUT/DELETE /api/sso/config sign in with your own identity provider · configure it (the client secret has no read path)
GET /api/jobs/:id · GET /api/jobs/:id/stream job transcript · live SSE log

:id is a registry id, not a compose project name — the server owns the stored spec and resolves stack: itself. A spec that interpolates ${PR} needs it on every call (?PR=123), and the same variables on down as on up, or teardown targets a different stack than deploy created.

Two security guards, because this API destroys infrastructure: a bearer token (PSTACK_TOKEN) on every mutating route, and — if no token is set — the server refuses to bind anything but 127.0.0.1, so an unauthenticated instance cannot be exposed by accident. Job history is in-memory and unpersisted, consistent with the no-state-store rule.

docs/control-plane.md §6 has the worked curl flow and the five behaviours that surface is carrying — why variables are not persisted, why PUT parses before it writes, and why DELETE fails closed.

Since 0.26.0 a new host runs previews as Docker Swarm stacks (one manager; workers join from the Swarm page — you keep writing plain compose, the file is converted on every deploy), a spec can carry a sleep: policy so an idle preview goes to sleep and wakes on the next request, and a deployment can be shared by link. docs/usage.md §7b.

Since 0.27.0 people can sign in with your own identity provider — you register one OAuth/OIDC application in your org (Google Workspace, Okta, GitHub, GitLab, …), paste the client id and secret in, and accounts appear on first login instead of being created by hand. Local accounts, the machine token and personal API tokens are untouched. docs/usage.md §7c.

See docs/control-plane.md for the architecture, docs/usage.md for worked examples, and docs/bootstrap.md to build a host from scratch (Hetzner + cloud-init).

Scope

In: the spec (kind, requires, axes), the CLI, leak verification, the HTTP API, the web UI, and the deployment registry — a control plane holding many deployments addressed by id (internal/registry; see docs/control-plane.md).

Not built, deliberately: a persistent job store, a plugin system, a reconciliation loop. The registry is a cache of intent — truth lives in Docker and in each axis's assert_* probe — so losing it means "I forgot what you asked for", not "the host is inconsistent". The spec has also not yet been proven against a second project; until it expresses one without changes, extra surface is a guess.

Still out: multi-tenancy. One spec, one Docker socket, one trust level; every caller who can reach the API can do everything. Real multi-tenancy needs a per-tenant isolation boundary (separate VMs/microVMs, or Kubernetes namespaces) plus a credential boundary — a different product. Tenant ids, per-user auth or RBAC bolted onto api.ts would create the appearance of a boundary where none exists, which is worse than having none.

Probably never: running untrusted user-supplied specs. Accepting a spec is accepting arbitrary compose and arbitrary shell hooks — it is remote code execution by design, not by bug — and the Docker socket mount is root-equivalent on the host. Note also that a shared Docker host has no memory isolation unless you add mem_limit yourself; one greedy heap can OOM every stack on the box.

Development

go test -race -timeout 120s ./...    # every package, incl. end-to-end leak detection against the real filesystem
go vet ./...
bun install && bun run check         # the whole repo: Go, the conformance suite, the UI, the client

The conformance suite (../conformance) is the black-box specification: it spawns the built binary and compares every CLI transcript and API response against checked-in goldens, and every one of its tests is proven non-vacuous against a server that asserts nothing.

MIT.

Documentation

Overview

Package pstack carries the nine files the binary embeds. Explicit paths, never a glob: the READMEs beside the assets must not ship, and a pattern that matches nothing is a compile error — which is exactly the failure mode `with { type: 'text' }` had at bundle time, moved earlier.

Index

Constants

This section is empty.

Variables

View Source
var AgentScript string

AgentScript is the pstack-agent node reporter, passed as `sh -c` to a stock docker CLI image on every node (no pstack binary on workers). It only reports; every decision is the control plane's.

View Source
var CloudInitTemplate string

CloudInitTemplate is the cloud-config user-data template.

View Source
var ControlTemplate string

ControlTemplate is the control stack's compose file, rendered by init.

View Source
var GrafanaDatasources string

GrafanaDatasources is Grafana's provisioned Loki datasource, which init writes to control/grafana/datasources/loki.yaml with `--logging loki`. Embedded as-is for LokiConfig's reasons: nothing in it varies by host, and it holds no credential.

View Source
var LokiConfig string

LokiConfig is Loki's config file, which init writes beside the control compose file with `--logging loki`. Embedded as-is, never rendered: nothing in it varies by host, and it holds no credential.

View Source
var OpenAPISpec []byte

OpenAPISpec is the API's own OpenAPI document, served at `/api/openapi.yaml` and, converted, at `/api/openapi.json`.

The SAME file oascmd-gen reads to generate `pstack api`, so the served document and the shipped commands cannot describe different APIs — and a route missing from it fails a test before either exists. Embedding costs ~34KB in a 17MB binary; fetching it from anywhere at runtime would mean a host could serve a spec that does not match the binary answering the requests.

View Source
var PackageJSON []byte

PackageJSON is the workspace manifest — the version of record (lockstep with the TS packages).

View Source
var ShareHTML string

ShareHTML is the page a share link opens.

View Source
var UIHTML string

UIHTML is the basic web UI, served for every non-/api/ path.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
pstack command
The pstack binary.
The pstack binary.
internal
api
Forwarding (docs/migrate-forward-design.md): this host (A) passes deploys and visitors it no longer serves to another pstack (B).
Forwarding (docs/migrate-forward-design.md): this host (A) passes deploys and visitors it no longer serves to another pstack (B).
apicli
Package apicli is the `pstack api …` command tree, GENERATED from `packages/pstack/api/openapi.yaml`.
Package apicli is the `pstack api …` command tree, GENERATED from `packages/pstack/api/openapi.yaml`.
auth
Package auth is accounts, sessions and personal API tokens, on top of the Store.
Package auth is accounts, sessions and personal API tokens, on top of the Store.
autolabel
Package autolabel generates the Traefik labels and network wiring a preview service needs, from one short label — and, on a host that runs Loki, the logging block that ships its output there.
Package autolabel generates the Traefik labels and network wiring a preview service needs, from one short label — and, on a host that runs Loki, the logging block that ships its output there.
cli
`pstack api …` — every HTTP route as a command, generated from `packages/pstack/api/openapi.yaml`.
`pstack api …` — every HTTP route as a command, generated from `packages/pstack/api/openapi.yaml`.
cloudinit
Package cloudinit is `pstack cloud-init` — fill the cloud-config template and print a ready-to-boot user-data file.
Package cloudinit is `pstack cloud-init` — fill the cloud-config template and print a ready-to-boot user-data file.
compose
Package compose is the Docker Compose invocation.
Package compose is the Docker Compose invocation.
config
Package config is the portable host configuration document: everything that makes a pstack host *this* host, in a form that can be carried to a new one.
Package config is the portable host configuration document: everything that makes a pstack host *this* host, in a form that can be carried to a new one.
events
Package events is the domain event bus.
Package events is the domain event bus.
exec
Package exec runs things.
Package exec runs things.
hostvars
Package hostvars is host-level variables and secrets — the GitHub-Actions model, scoped to one host.
Package hostvars is host-level variables and secrets — the GitHub-Actions model, scoped to one host.
image
Package image is `pstack build-image` — build the control image from the running binary itself.
Package image is `pstack build-image` — build the control image from the running binary itself.
initctl
Package initctl is `pstack init` — stand up the CONTROL stack on a host.
Package initctl is `pstack init` — stand up the CONTROL stack on a host.
inspect
The CONTROL STACK's own runtime — traefik, pstack, the optional advanced UI — as an operator's page shows it.
The CONTROL STACK's own runtime — traefik, pstack, the optional advanced UI — as an operator's page shows it.
jobs
Package jobs is the in-memory job registry.
Package jobs is the in-memory job registry.
js
Package js reproduces the JavaScript primitives the contract leans on.
Package js reproduces the JavaScript primitives the contract leans on.
jsonx
Package jsonx is JSON.stringify.
Package jsonx is JSON.stringify.
log
Package log is the logging seam: the CLI wants progress on stdout, the API wants the same events captured per job and streamed to a browser, so the orchestrator writes to a Sink and each consumer passes its own.
Package log is the logging seam: the CLI wants progress on stdout, the API wants the same events captured per job and streamed to a browser, so the orchestrator writes to a Sink and each consumer passes its own.
loki
Package loki is Loki's settings: what an operator may change, the ranges pstack holds them to, and the bytes they become in control/loki/config.yaml and control/loki/s3-credentials.
Package loki is Loki's settings: what an operator may change, the ranges pstack holds them to, and the bytes they become in control/loki/config.yaml and control/loki/s3-credentials.
nodestats
The agent's and the prunes' docker commands, as strings, and the reading of a prune's output.
The agent's and the prunes' docker commands, as strings, and the reading of a prune's output.
notify
Package notify delivers domain events to the outside world.
Package notify delivers domain events to the outside world.
omap
Package omap is the ordered map the whole compose pipeline runs on.
Package omap is the ordered map the whole compose pipeline runs on.
readiness
Package readiness answers "did the stack actually come up?".
Package readiness answers "did the stack actually come up?".
redact
Package redact is redaction for anything a human is shown.
Package redact is redaction for anything a human is shown.
registries
Package registries is private registry credentials for the control plane.
Package registries is private registry credentials for the control plane.
registry
Package registry is the deployment registry — what turns pstack from a CLI into a control plane.
Package registry is the deployment registry — what turns pstack from a CLI into a control plane.
routing
CUSTOM ROUTES: a stable alias for a stack.
CUSTOM ROUTES: a stable alias for a stack.
scaler
Package scaler adds and removes swarm workers through OpenTofu.
Package scaler adds and removes swarm workers through OpenTofu.
scheduler
Package scheduler is sleep and wake-on-call: the SleepIndex (hostname → the deployment the catch-all router's request belongs to), the TrafficMeter (Traefik's per-router counters → "last request"), the tick that applies a spec's `sleep:` policy, Recency (when a deployment was last in use, which the api package's pressure sleep ranks by too), and the "spinning up" page.
Package scheduler is sleep and wake-on-call: the SleepIndex (hostname → the deployment the catch-all router's request belongs to), the TrafficMeter (Traefik's per-router counters → "last request"), the tick that applies a spec's `sleep:` policy, Recency (when a deployment was last in use, which the api package's pressure sleep ranks by too), and the "spinning up" page.
settings
Package settings is the handful of host knobs an operator may change at RUNTIME, without restarting the control container.
Package settings is the handful of host knobs an operator may change at RUNTIME, without restarting the control container.
share
Package share is share links: a signed, expiring, READ-ONLY grant to one deployment.
Package share is share links: a signed, expiring, READ-ONLY grant to one deployment.
signals
Package signals answers the two questions something outside pstack asks before it turns a worker machine on or off:
Package signals answers the two questions something outside pstack asks before it turns a worker machine on or off:
spec
Package spec parses and validates a `preview.yml` into a resolved Stack.
Package spec parses and validates a `preview.yml` into a resolved Stack.
specs
Package specs is the named-spec store — store a spec once, reference it from many deployments.
Package specs is the named-spec store — store a spec once, reference it from many deployments.
sso
Package sso is sign-in with the operator's own identity provider.
Package sso is sign-in with the operator's own identity provider.
stack
Package stack is lifecycle orchestration.
Package stack is lifecycle orchestration.
store
Package store is the persistent state that is not the registry: users, sessions, API tokens, webhook registrations and delivery logs, the terminal audit, host variables, SSO, host settings, Loki's settings, and the custom routes (an alias name -> the deployment it points at).
Package store is the persistent state that is not the registry: users, sessions, API tokens, webhook registrations and delivery logs, the terminal audit, host variables, SSO, host settings, Loki's settings, and the custom routes (an alias name -> the deployment it points at).
swarm
Package swarm is Docker Swarm: the compose→swarm conversion, the `docker stack` command lines, the node/join helpers behind the swarm panel, and the line that puts the Loki log plugin on a node.
Package swarm is Docker Swarm: the compose→swarm conversion, the `docker stack` command lines, the node/join helpers behind the swarm panel, and the line that puts the Loki log plugin on a node.
terminal
Package terminal is a shell inside a preview container, over a WebSocket.
Package terminal is a shell inside a preview container, over a WebSocket.
testfacts
Package testfacts locates packages/conformance/golden/facts — the measured Bun semantics the foundation packages are tested against.
Package testfacts locates packages/conformance/golden/facts — the measured Bun semantics the foundation packages are tested against.
upgrade
Package upgrade is `pstack upgrade` — move a host to a new version of pstack.
Package upgrade is `pstack upgrade` — move a host to a new version of pstack.
version
Package version answers "which pstack is this" from two sources, in order: the -X flag a release build stamps, else the `version` field of the embedded package.json.
Package version answers "which pstack is this" from two sources, in order: the -X flag a release build stamps, else the `version` field of the embedded package.json.
webhooks
Package webhooks is notifier registrations and their delivery log.
Package webhooks is notifier registrations and their delivery log.
yamlx
Package yamlx is Bun.YAML.parse.
Package yamlx is Bun.YAML.parse.
tools
yamlcat command
yamlcat parses YAML files with pstack's own parser and prints each one as JSON, one line per file: {"path":…,"json":…} or {"path":…,"error":…}.
yamlcat parses YAML files with pstack's own parser and prints each one as JSON, one line per file: {"path":…,"json":…} or {"path":…,"error":…}.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL