Skip to content

pstack

A preview environment for every pull request — provisioned with the resources it needs, torn down in reverse, and proven gone.
Terminal window
curl -fsSL https://github.com/samishal1998/preview-stacks/releases/latest/download/install.sh | sh

One static binary for Linux and macOS. It is the CLI, the HTTP API and the web UI.

Isolation axes

A preview needs more than containers: a database branch, a queue namespace, per-PR images, DNS. Each is an axis with up to four shell hooks — up, assert_live, down, assert_gone — provisioned around your Compose project and torn down in reverse.

Teardown you can prove

down is best-effort, so it never stops halfway. Then every axis with an assert_gone hook proves its resource is gone, and anything still there makes the run exit 2. A leak is a failed job, not a surprise on the bill.

A control plane

pstack init stands up Traefik with TLS on your domain, an HTTP API with a generated pstack api client, a web UI and signed webhooks. Deploy from CI in two requests: submit the spec, then up.

Swarm, sleep and wake

Spread previews across worker machines with Docker Swarm. Idle previews sleep and wake on the next request, and pstack tells a machine manager when a worker is needed or spare. A node short of disk or memory prunes images, sleeps idle previews and refuses new ones until there is room.

Teams

Sign in with GitHub, Google, Okta or any OIDC provider. Four roles divide what people may do, and share links show one preview’s details and logs to someone without an account.

Logs

Optional Loki and Grafana in the control stack. Every preview service without a logging: of its own ships its logs there, and Grafana signs in with pstack accounts.