Docker Static Server
Static file server designed for serving files not websites
Sometimes, you just need a simple container to host some static files. Whether that be files for download, images to show, or a directory of files.
#Why not just use Nginx?
If you’re not really bothered, the default
nginx container will work just fine for you, however this container has a few modifications which make it more suited to serving static files:
- Use environment variables for customization
- Healthcheck endpoint
- GZIP all files
X-Forwarded-Forheader when getting client IP
Previously I had created
tstatic to do this, but Nginx is far better as a server than node. The less node in my stack, the better!
Note this isn’t designed for serving websites. In fact, design decisions were made which make it really bad for websites. If you want to serve websites, take a look at
Share this page