From 816e354540ff8b9eeb719e9c18a3137d104ba9fe Mon Sep 17 00:00:00 2001 From: William Brawner Date: Mon, 11 May 2020 22:05:03 -0700 Subject: [PATCH] Use gzip compression in nginx Signed-off-by: William Brawner --- Dockerfile | 1 + gzip.conf | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 gzip.conf diff --git a/Dockerfile b/Dockerfile index 7ed777e..d641ea4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ FROM nginx:latest +COPY gzip.conf /etc/nginx/conf.d COPY src /usr/share/nginx/html diff --git a/gzip.conf b/gzip.conf new file mode 100644 index 0000000..4b82adb --- /dev/null +++ b/gzip.conf @@ -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;