File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 exit 1; \
3737 esac; \
3838 rm -rf "/tmp/*" ; \
39- apk add --update --no-cache goaccess nginx
39+ apk add --update --no-cache goaccess nginx nginx-mod-http-brotli
4040COPY --from=build /app/www /var/www/allabiografer.se
4141COPY etc /etc
4242COPY init-wrapper /
Original file line number Diff line number Diff line change 1+ load_module modules/ngx_http_brotli_filter_module.so;
2+ load_module modules/ngx_http_brotli_static_module.so;
3+
14worker_processes 1;
25
36events {
@@ -17,5 +20,19 @@ http {
1720
1821 access_log /var/log/nginx/access.log main;
1922
23+ # Brotli compression (preferred, ~15-20% better than gzip)
24+ brotli on;
25+ brotli_comp_level 6;
26+ brotli_min_length 256 ;
27+ brotli_types text/css;
28+
29+ # Gzip fallback for older clients
30+ gzip on;
31+ gzip_vary on;
32+ gzip_proxied any;
33+ gzip_comp_level 6;
34+ gzip_min_length 256 ;
35+ gzip_types text/css;
36+
2037 include /etc/nginx/sites-enabled/*;
2138}
You can’t perform that action at this time.
0 commit comments