https://github.com/cssnr/docker-nginx-static
Docker Static Web Server
https://github.com/cssnr/docker-nginx-static
Last synced: 5 months ago
JSON representation
Docker Static Web Server
- Host: GitHub
- URL: https://github.com/cssnr/docker-nginx-static
- Owner: cssnr
- Created: 2024-07-23T05:46:53.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-23T21:57:43.000Z (almost 2 years ago)
- Last Synced: 2025-01-07T21:11:24.817Z (over 1 year ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/cssnr/docker-nginx-static/pkgs/container/docker-nginx-static)
[](https://github.com/cssnr/docker-nginx-static/pkgs/container/docker-nginx-static)
[](https://github.com/cssnr/docker-nginx-static/tags)
[](https://github.com/cssnr/docker-nginx-static/releases)
[](https://github.com/cssnr/docker-nginx-static/releases/latest)
[](https://github.com/cssnr/docker-nginx-static/releases/latest)
[](https://github.com/cssnr/docker-nginx-static/actions/workflows/build.yaml)
[](https://github.com/cssnr/docker-nginx-static/actions/workflows/lint.yaml)
[](https://github.com/cssnr/docker-nginx-static/pulse)
[](https://github.com/cssnr/docker-nginx-static?tab=readme-ov-file#readme)
[](https://github.com/cssnr/docker-nginx-static/tree/master/src)
[](https://github.com/cssnr/docker-nginx-static/graphs/contributors)
[](https://github.com/cssnr/docker-nginx-static/discussions)
[](https://github.com/cssnr/docker-nginx-static/forks)
[](https://github.com/cssnr/docker-nginx-static/stargazers)
[](https://cssnr.github.io/)
[](https://discord.gg/wXy6m2X8wY)
[](https://ko-fi.com/cssnr)
# Docker Nginx Static
Docker Static Web Server
Coming Soon...
## Options
| Variable | Default | Description of Environment Variable |
| :---------- | :--------------------: | :------------------------------------------------- |
| STATIC | /static | Nginx root directory |
| SUID | 1000 | Directory group/user ID |
| NGINX_INDEX | `index.html index.htm` | Nginx directory index files |
| ERROR_PAGE | `/404.html` | Nginx 404 page, set `off` to disable |
| GZIP_TYPES | `*` | Nginx gzip_types, set `off` to disable |
| GZIP_LENGTH | `1000` | Minimum content size to compress |
| BASIC_AUTH | - | Basic auth file contents |
| BASIC_REALM | `Unauthorized` | Minimum content size to compress |
See the [src/10-setup.sh](src/10-setup.sh) file for more details.
#### Basic Auth
```shell
$ htpasswd -nb user pass
user:$apr1$XFVN0nJA$IgZxtMHVAeA.Pu7ufU7/I0
```
Replace all `$` with `$$` for docker-compose.yaml files.
Use `\n` for newlines to add multiple credentials.
```yaml
environment:
BASIC_AUTH: 'user:$$apr1$$XFVN0nJA$$IgZxtMHVAeA.Pu7ufU7/I0\nuser2:$$apr1$$vswJgdwo$$2XkDOrvJFQ2pKwrXqGeWM0'
```
For examples see:
- [docker-compose.yaml](docker-compose.yaml)
- [docker-compose-swarm.yaml](docker-compose-swarm.yaml)
## Support
Please let us know if you run into any [issues](https://github.com/cssnr/docker-nginx-static/issues)
or want to see [new features](https://github.com/cssnr/docker-nginx-static/discussions/categories/feature-requests)...
For general help or to request a feature:
- Q&A Discussion: https://github.com/cssnr/docker-nginx-static/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/docker-nginx-static/discussions/categories/feature-requests
If you are experiencing an issue/bug or getting unexpected results:
- Report an Issue: https://github.com/cssnr/docker-nginx-static/issues
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
- Provide General Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/)
# Contributing
Please consider making a donation to support the development of this project
and [additional](https://cssnr.com/) open source projects.
[](https://ko-fi.com/cssnr)
If you would like to submit a PR, please review the [CONTRIBUTING.md](#contributing-ov-file).
For a full list of current projects visit: [https://cssnr.github.io/](https://cssnr.github.io/)