Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cupcakearmy/docker-static
Static Server
https://github.com/cupcakearmy/docker-static
brotli docker docker-compose etag gzip nginx static-server
Last synced: 2 months ago
JSON representation
Static Server
- Host: GitHub
- URL: https://github.com/cupcakearmy/docker-static
- Owner: cupcakearmy
- Created: 2019-08-10T19:46:49.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-31T19:17:09.000Z (5 months ago)
- Last Synced: 2024-10-05T02:36:31.646Z (3 months ago)
- Topics: brotli, docker, docker-compose, etag, gzip, nginx, static-server
- Language: TypeScript
- Homepage:
- Size: 31.3 KB
- Stars: 17
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# NGINX Static Server
![Docker Pulls](https://img.shields.io/docker/pulls/cupcakearmy/static?style=flat-square)
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/cupcakearmy/static/latest?style=flat-square)
![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/cupcakearmy/static/latest?style=flat-square)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 🚀
```yaml
# docker-compose.yml
version: '3.7'services:
server:
image: cupcakearmy/static
restart: unless-stopped
ports:
- 80:80
volumes:
- ./public:/srv:ro
``````bash
docker-compose up -d
```### Custom Configuration
```
# my.conf
server {
listen 80;
server_name _;location / {
root /srv;
try_files $uri /index.html =404;
}
}
``````yaml
version: '3.7'services:
server:
# ...
volumes:
- ./my.conf:/usr/local/nginx/conf/sites/default.conf
# ...
```