docker-static/README.md
Karl Anthony B. Baluyot f1cc4805c9
docs: minor typo
2024-01-22 09:23:10 +08:00

1.3 KiB

NGINX Static Server

Docker Pulls Docker Image Size (tag) Docker Image Version (tag latest semver)

This is a little docker image for hosting static content efficiently. Supports ETags & Brotli/GZip compression out of the box.

Automatically builds the latest mainline and stable releases weekly.

Features

  • Brotli & GZip
  • ETag
  • No server tokens

Tags

Tags follow the official nginx naming convention.

  • mainline, same as latest
  • stable
  • Specific version

Quickstart 🚀

# docker-compose.yml
version: '3.7'

services:
  server:
    image: cupcakearmy/static
    restart: unless-stopped
    ports:
      - 80:80
    volumes:
      - ./public:/srv:ro
docker-compose up -d

Custom Configuration

# my.conf
server {
    listen 80;
    server_name _;

    location / {
        root   /srv;
        try_files $uri /index.html =404;
    }
}
version: '3.7'

services:
  server:
    # ...
    volumes:
      - ./my.conf:/usr/local/nginx/conf/sites/default.conf
    # ...