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_SECRETwithgenerateValue: 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
diskmounted at/data, where saved tables live. The Dockerfile's entrypoint makes it writable bynobody. A disk needs a paid plan (the file saysplan: 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_SECRETis 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-Forand its own address after it, sorender.yamlsetsWISP_CLIENT_IP_HEADER=x-forwarded-forandWISP_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
datadisk 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::kvandwisp::blobsdefault to files under$WISP_DATA/storage, beside the tables. See Storage.
More
Is This Page Useful?