mirror of
https://github.com/cupcakearmy/docker-static.git
synced 2026-07-04 22:45:35 +00:00
initial commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# NGINX Static Server
|
||||
|
||||
This is a little docker image for histing static content efficiently.
|
||||
Supports ETags & Brotli/GZip compression out of the box.
|
||||
|
||||
## 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
|
||||
# ...
|
||||
```
|
||||
Reference in New Issue
Block a user