Wisp is in pre-release, self-hosted since GitHub suspended us. Install it, or see the changelog.

Wisp

Host on Render

Render builds a Dockerfile from your repository and runs it as a web service.

Build

wisp deploy init render       # render.yaml, and a Dockerfile if there is none

The image build has no wisp command. So the command also runs the asset build, and changes .gitignore to keep .wisp/app.css, .wisp/npm, .wisp/img and .wisp/fonts in git (the rest of .wisp/ stays out). Commit them, and run wisp build again after you change styles, images, fonts or NPM imports.

render.yaml is a blueprint with one web service on the docker runtime, named for your package. The Dockerfile is the one wisp deploy init docker writes. --force replaces the file. What the blueprint sets:

  • WISP_SECRET with generateValue: true.
  • healthCheckPath: /_wisp/health. A new deploy takes traffic only once it answers 200, and the path answers 503 once the server is stopping. Render gives a stopping instance 30 s by default (maxShutdownDelaySeconds), past the server's 10 s drain.
  • A 1 GB disk mounted at /data, where saved tables live. The Dockerfile's entrypoint makes it writable by nobody. A disk needs a paid plan (the file says plan: starter). It keeps the service to one instance (numInstances: 1; Render cannot scale a service with a disk), and a deploy stops the old instance before the new one starts.

Deploy

Commit both files and push. In Render choose New, Blueprint and pick the repository. Render builds the Dockerfile and sets PORT, which the app listens on.

Environment

  • WISP_SECRET is generated for you by the blueprint; to set your own, use the service's environment settings.
  • The client's address: Render's proxy puts the visitor first in X-Forwarded-For and its own address after it, so render.yaml sets WISP_CLIENT_IP_HEADER=x-forwarded-for and WISP_CLIENT_IP_DEPTH=2: cx.client_ip() is the entry before Render's, the one Render saw connect.
  • Other variables: Environment variables.

Limits

  • The image is the Docker one: epoll instead of io_uring under Docker's default profile.
  • WebSockets and streaming work, as in any container.

Files and Data

  • static/ and the styles are inside the binary.
  • Saved tables live on the data disk at /data, on the one instance. For more than one instance, drop the disk and give the tables a shared store (Where rows are kept).
  • wisp::kv and wisp::blobs default to files under $WISP_DATA/storage, beside the tables. See Storage.

More

Host with Docker, Deploying.

Is This Page Useful?

View This Page's Source

Type to search every docs page and heading.