Skip to content

Commit

Permalink
feat: enable gzip
Browse files Browse the repository at this point in the history
  • Loading branch information
batleforc committed Aug 24, 2024
1 parent e0b27f6 commit 75e8bb0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion build/front/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN npx nx build front

FROM registry.hub.docker.com/library/nginx:1.27-alpine AS deploy
WORKDIR /usr/share/nginx/html
RUN apk add brotli nginx-mod-http-brotli

RUN rm -rf ./*
COPY ./build/front/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist/apps/front .
Expand Down
5 changes: 0 additions & 5 deletions build/front/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ server {
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml;

# BROTLI
brotli on;
brotli_comp_level 6;
brotli_types text/xml image/svg+xml application/x-font-ttf image/vnd.microsoft.icon application/x-font-opentype application/json font/eot application/vnd.ms-fontobject application/javascript font/otf application/xml application/xhtml+xml text/javascript application/x-javascript text/plain application/x-font-truetype application/xml+rss image/x-icon font/opentype text/css image/x-win-bitmap;

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

0 comments on commit 75e8bb0

Please sign in to comment.