Serve static web files and assets with a tiny, fast, and production-ready web server. Built with Rust, it is memory-safe and has significantly reduced CPU and RAM overhead, making it ideal for resource-constrained environments. The entire server is a single, dependency-free 4MB binary, available for Linux, macOS, Windows, Docker, and even WebAssembly.
It comes packed with features for modern web development, including:
services:
web:
image: joseluisq/static-web-server:2
container_name: static-web-server
ports:
- "8080:80"
environment:
- SERVER_PORT=80
- SERVER_ROOT=/public
- SERVER_BASIC_AUTH=${SERVER_BASIC_AUTH}
volumes:
- ./public:/public
restart: unless-stopped# Basic Authentication credentials (format: username:password)
# If you do not want basic auth, you can remove this variable or leave it blank.
SERVER_BASIC_AUTH=admin:your_super_secret_passwordAuto-fetched about 2 hours ago
Auto-fetched about 2 hours ago