stackapRequest access

Product

Deployments

A Stackap deployment turns a git push into a running, HTTPS-served app: the server builds an image, starts it beside the old version, checks that it is healthy, and only then switches traffic.

What it does

You push your code to your project's git remote on the Stackap server over SSH, or run stackap deploy <slug>, which pushes your current HEAD for you. Only pushes to the project's production branch start a build. Pushes to other branches are stored and ignored.

If the repository has a Dockerfile, Stackap builds it. If it has none, Stackap generates one for the project types it recognizes: Next.js, single-page apps built with Vite, Create React App, Vue CLI or Parcel, static-output sites (Astro, Docusaurus, Gatsby, Eleventy, VitePress), a plain index.html, and Node apps with a start script. The frameworks section lists exactly what is recognized. A project Stackap cannot classify fails with a stated reason, and whatever was live keeps serving.

Build-time secrets are handled deliberately. Variables beginning with NEXT_PUBLIC_ are passed through, because they are public by design. Every other variable is replaced with a placeholder while the image builds, so a secret is never baked into an image layer. Real values reach the container only when it runs, through a private file and not on a command line.

How it works

  1. Push. The push arrives at a restricted SSH user that can only send and receive git repositories.
  2. Queue. A hook tells the control plane over a localhost-only, secret-protected endpoint. The push is recorded and a build is queued.
  3. Build. Docker builds the image on the same machine. A 31,592-page Next.js site builds there in about 96 seconds, peaking near 2.8 GB of the server's 7.75 GB of memory.
  4. Health check. The new container starts next to the old one and is polled until it answers successfully or a timeout expires. A container that crashes, hangs or errors is discarded, and no visitor was ever sent to it.
  5. Swap. Only after the check passes does Stackap change the routing table, inside a database transaction, so the change happens completely or not at all. Caddy then sends traffic to the new container.

Each project also has a port and a health-check path. They default sensibly and can be set per project by the owner (PUT /v1/projects/:slug/settings). An API-only app that does not answer on the default path needs its own; that case has been tested with a toy app on port 8080 and /healthz.

In practice

$ stackap deploy my-app
$ stackap deployments my-app
$ stackap logs my-app --source build
$ stackap logs my-app --source runtime --limit 100

Early-access scope

Questions

Does a failed build take my site down?
No. A failed build or an unhealthy container never receives traffic. The previous version keeps serving, and the failure is recorded where stackap logs and the dashboard can show it. This was tested with a deliberately broken release.
How long does a deploy take?
It depends on the build. The one large build measured, a 31,592-page Next.js site, took about 96 seconds. Other project sizes have not been benchmarked, so treat that as one data point.
Do I need a Dockerfile?
Not for the recognized project types. If you have one, Stackap uses it instead of generating its own.

Stackap is in early access. Tell us what you run and we will reply with a straight answer about whether it fits.

Ask for an invitation

Last updated .