docker-static/README.md

71 lines
1.3 KiB
Markdown
Raw Normal View History

2019-08-10 22:46:44 +02:00
# NGINX Static Server
2022-04-07 12:05:00 +02:00
![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)
2019-08-10 22:46:44 +02:00
This is a little docker image for histing static content efficiently.
2019-08-10 22:48:20 +02:00
**Supports ETags & Brotli/GZip** compression out of the box.
2019-08-10 22:46:44 +02:00
2022-11-01 22:35:03 +01:00
Automatically builds the latest mainline and stable releases weekly.
2022-11-01 22:37:01 +01:00
## Features
- Brotli & GZip
- ETag
- No server tokens
2022-11-01 22:35:03 +01:00
## Tags
Tags follow the official nginx naming convention.
- `mainline`, same as `latest`
- `stable`
- Specific version
2019-08-10 22:46:44 +02:00
## 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
# ...
```