https://github.com/retailify/nginx-base
https://github.com/retailify/nginx-base
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/retailify/nginx-base
- Owner: retailify
- Created: 2021-06-26T09:07:45.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-26T09:39:10.000Z (almost 5 years ago)
- Last Synced: 2025-02-13T15:24:35.451Z (over 1 year ago)
- Language: Dockerfile
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nginx-Base Docker Container
This images was build from the official NGINX source with compiled modules as described in the headline.
see: https://hub.docker.com/_/nginx
## Dockerhub image
[nginx-base](https://hub.docker.com/r/jproxx/nginx-base)
## Build
```bash
docker-compose up --build
```
## Enable Brotli compression
In your `nginx.conf` you have to load the compiled Brotli modules and switch Brotli on. You will find all configuration options in this github repository: https://github.com/google/ngx_brotli
```
load_module modules/ngx_http_brotli_filter_module.so;
load_module modules/ngx_http_brotli_static_module.so;
http {
# other nginx configurations.....
gzip on;
brotli on;
brotli_comp_level 6;
brotli_static on;
brotli_types application/atom+xml application/javascript application/json application/rss+xml
application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
include /etc/nginx/conf.d/*.conf;
}
```
## Enable Lua support
Put this in your `nginx.conf` to load Lua.
```
load_module modules/ndk_http_module.so;
load_module modules/ngx_http_lua_module.so;
```
And this into your `default.conf`.
```
server {
# other server stuff
location /example {
content_by_lua_block {
ngx.say("OK")
}
}
}