Host with Docker
Docker packages the binary in a small image that runs on your machine or any container host. WebSockets, streaming and saved tables all work.
Build
wisp build --docker # --force replaces existing files
docker build -t my-app .
wisp build --docker writes a two-stage Dockerfile (rust:slim, then debian:stable-slim, HOST=0.0.0.0, PORT=3000, WISP_DATA=/data) and a .dockerignore. Files that exist are left alone unless you pass --force; the Dockerfile you have is the one that is built.
Deploy
docker run -p 3000:3000 -e WISP_SECRET=... -v my-app-data:/data my-app
Fly.io, Railway, Render, Cloud Run and Azure Container Apps build the Dockerfile as it is: Fly.io, Railway, Render, Cloud Run, Azure.
Environment
WISP_SECRET: 32 or more random characters, needed by an app that signs cookies. Pass it with-eor an env file.- Other variables: Environment variables.
Limits
- Docker's default seccomp profile refuses io_uring, so the server uses an epoll loop per worker. A profile allowing
io_uring_setup,io_uring_enterandio_uring_registerbrings it back. - The image runs as
nobody. - WebSockets and streaming work.
Files and Data
static/and the styles are inside the binary.- Saved tables live in
/data: mount a volume there (-v my-app-data:/data) or they go with the container. See Where rows are kept.
More
Is This Page Useful?