Replace nginx image to enable gzpi and brotli encoding

This commit is contained in:
ErickSkrauch 2019-11-26 21:30:53 +03:00
parent b47522e6f9
commit 885729fcde
2 changed files with 15 additions and 1 deletions

View File

@ -68,7 +68,7 @@ CMD ["php-fpm"]
# ================================================================================ # ================================================================================
FROM nginx:1.15.10-alpine AS web FROM fholzer/nginx-brotli:v1.16.0 AS web
ENV PHP_SERVERS php:9000 ENV PHP_SERVERS php:9000

View File

@ -29,5 +29,19 @@ http {
default "off"; default "off";
} }
# GZIP
gzip on;
gzip_comp_level 6;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types application/* font/* image/* text/*;
# Brotli
brotli on;
brotli_comp_level 6;
brotli_min_length 256;
brotli_types application/* font/* image/* text/*;
include /etc/nginx/conf.d/*.conf; include /etc/nginx/conf.d/*.conf;
} }