diff --git a/docker/Dockerfile b/docker/Dockerfile index 1c789a366..ac801a053 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 diff --git a/public/Makefile b/public/Makefile index a2d90da1a..7ebd5aa56 100644 --- a/public/Makefile +++ b/public/Makefile @@ -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