Redbean - single-file distributable web server
-
![[red stuffed lobster logo]](//worker.jart.workers.dev/redbean2/redbean.png)
redbean
single-file distributable web server
redbean is an open source webserver in a zip executable that runs on six operating systems. The basic idea is if you want to build a web app that runs anywhere, then you download the redbean.com file, put your .html and .lua files inside it using the zip command, and then you've got a hermetic app you can deploy and share.
redbean embeds Lua, SQLite, and MbedTLS into a fork() driven application server that benchmarks at 1.1 million qps on a personal computer. It's got a live bestline REPL with code completion and a UNIX module too, that lets you directly use the Cosmopolitan Libc system call interface. redbean furthermore provides sandboxing and system call tracing for security. This makes redbean a great fit for when you want to build an app that's vertically integrated into a single tiny file that runs on nearly all PCs and servers.
Others have been taking this excellence to great heights:
https://github.com/kissgyorgy/redbean-docker
The smallest possible web server in Docker!
Built from Redbean: https://redbean.dev/, a single-file distributable web server.The final container takes only 501 kB:
$ docker images redbean-static REPOSITORY TAG IMAGE ID CREATED SIZE redbean-static latest 814da89a2fa7 16 minutes ago 501 kBor just 186 kB if you use the tinylinux version of Redbean:
$ docker images redbean-tinylinux REPOSITORY TAG IMAGE ID CREATED SIZE redbean-tinylinux latest 0b98596e96d8 2 seconds ago 186 kBExamples
There are a couple of example Dockerfiles in this repo if you want to build it yourself:
- Dockerfile-multistage of how to produce a container from "scratch"
- Dockerfile-tinylinux for the world record small version
- Dockerfile-onbuild if you just want a scratch container
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
![[red stuffed lobster logo]](http://worker.jart.workers.dev/redbean2/redbean.png)