Use gzip compression in nginx

Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
William Brawner 2020-05-11 22:05:03 -07:00
parent 95a096e105
commit 816e354540
2 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,4 @@
FROM nginx:latest FROM nginx:latest
COPY gzip.conf /etc/nginx/conf.d
COPY src /usr/share/nginx/html COPY src /usr/share/nginx/html

13
gzip.conf Normal file
View file

@ -0,0 +1,13 @@
gzip on;
gunzip on;
gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
application/javascript
application/json
application/xml
application/rss+xml
image/svg+xml;