Skip to content

Commit

Permalink
fix (admin): compress frontend assets in build
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-kerjean committed Oct 12, 2023
1 parent 0f50300 commit fbf24fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ RUN apk add git && \
FROM node:18-alpine AS builder_frontend
WORKDIR /home/
COPY --from=builder_prepare /home/filestash/ ./
RUN apk add make git && \
RUN apk add make git gzip brotli && \
npm install --legacy-peer-deps && \
make build_frontend
make build_frontend && \
cd public && make compress

# STEP3: BUILD THE BACKEND
FROM golang:1.19-buster AS builder_backend
Expand Down
2 changes: 1 addition & 1 deletion public/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all:
compress:
find . -type f -name '*.html' | xargs brotli -f -k
find . -type f -name '*.html' | xargs gzip -f -k
find . -type f -name '*.js' | xargs brotli -f -k
Expand Down

0 comments on commit fbf24fb

Please sign in to comment.