- Dockerfile 65.6%
- Shell 34.4%
|
|
||
|---|---|---|
| .github/workflows | ||
| default.conf | ||
| docker-compose.yml | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| LICENSE | ||
| README.md | ||
| renovate.json | ||
Docker Website Server
Customizable and performant container for hosting websites - Powered by Nginx
Note: This container is designed for hosting static sites, rather than simply serving files. For that, check out docker-static-server.
"Why not just use nginx:alpine?"
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 sites:
- Use environment variables for customization
- Healthcheck endpoint
- GZIP and Brotli support
- Serve pre-compressed files
- Use
X-Forwarded-Forheader when getting client IP
Nginx makes a brilliant file server regardless of how you use it.
Usage
version: "2.3"
services:
web:
image: theorangeone/website-server:latest
volumes:
- ".:/srv:ro"
ports:
- "80:80"
The server will serve files in the /srv directory. This directory can be mounted read-only.
Customization
This image supports some customizations:
$PUID: Set the user nginx runs as (default1000)
If you'd rather add some additional configuration yourself, you can mount an additional nginx config at /etc/nginx/extra.conf, which will be included in the primary config.