From 8f332e32d7f1b5dbcc8dfe582651d289e1c91fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20de=20Metz?= Date: Wed, 26 Feb 2020 18:27:04 +0100 Subject: [PATCH] Enable gzip for css and js files. --- Dockerfile | 1 + nginx_gzip.conf | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 nginx_gzip.conf diff --git a/Dockerfile b/Dockerfile index efa8ad8..a399f56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,5 @@ RUN yarn run build FROM nginx:alpine +COPY nginx_gzip.conf /etc/nginx/conf.d COPY --from=builder /code/dist /usr/share/nginx/html/ diff --git a/nginx_gzip.conf b/nginx_gzip.conf new file mode 100644 index 0000000..aca37d3 --- /dev/null +++ b/nginx_gzip.conf @@ -0,0 +1,2 @@ +gzip on; +gzip_types text/css text/javascript;