Skip to content

Commit

Permalink
Webpack improvements using chunking and gzip compression (#71)
Browse files Browse the repository at this point in the history
co-authored-by: Nathaniel Stevens <nstevens@pillartechnology.com>
  • Loading branch information
paul-jacob and Nathaniel Stevens authored Jul 3, 2019
1 parent 995a1f3 commit ec4efcf
Show file tree
Hide file tree
Showing 6 changed files with 284 additions and 39 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ RUN npm test
FROM nginx
COPY --from=builder /app/src/dist /usr/share/nginx/html
COPY --from=builder /app/src/run.sh /run.sh
COPY ./default.conf /etc/nginx/conf.d/default.conf
WORKDIR /etc/nginx
CMD ["/run.sh"]
23 changes: 23 additions & 0 deletions default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

gzip on;
gzip_static on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
Loading

0 comments on commit ec4efcf

Please sign in to comment.