1
Fork 0
Customizable and performant container for hosting websites - Powered by Nginx
This repository has been archived on 2026-05-19. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Dockerfile 65.6%
  • Shell 34.4%
Find a file
renovate[bot] 6e79d048d0
Update alpine Docker tag to v3.19 (#13)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-14 17:03:29 +00:00
.github/workflows Run on the 1st, regardless of day of the week 2023-04-10 17:47:08 +01:00
default.conf Set gzip types 2023-04-10 17:22:07 +01:00
docker-compose.yml Add compose file 2023-04-10 17:02:05 +01:00
docker-entrypoint.sh Init basic server 2021-06-23 22:07:24 +01:00
Dockerfile Update alpine Docker tag to v3.19 (#13) 2023-12-14 17:03:29 +00:00
LICENSE Initial commit 2021-06-23 21:54:55 +01:00
README.md Add the ability to add custom nginx config 2021-09-29 21:36:54 +01:00
renovate.json Add renovate.json 2023-03-14 22:53:00 +00:00

Docker Website Server

CI

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-For header 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 (default 1000)

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.