Precompress ExifTool WASM with Brotli and serve via nginx brotli_static.
Tor first loads drop from ~25 MB raw to ~5 MB on the wire; prod build writes .wasm.br sidecars and Alpine nginx serves them under /assets with long-lived cache.
This commit is contained in:
@@ -29,11 +29,14 @@ ENV VITE_API_BASE_URL=$VITE_API_BASE_URL \
|
||||
VITE_VALIDATION_UPLOAD_MAX_VIEWS_MAX=$VITE_VALIDATION_UPLOAD_MAX_VIEWS_MAX \
|
||||
VITE_VALIDATION_UPLOAD_MAX_IMAGE_BYTES=$VITE_VALIDATION_UPLOAD_MAX_IMAGE_BYTES
|
||||
|
||||
RUN npm run build
|
||||
RUN npm run build && node scripts/optimize-dist-wasm.mjs
|
||||
|
||||
FROM nginx:1.29.4-alpine
|
||||
FROM alpine:3.23
|
||||
|
||||
RUN apk add --no-cache gettext
|
||||
RUN apk add --no-cache \
|
||||
nginx=1.28.3-r7 \
|
||||
nginx-mod-http-brotli=1.28.3-r7 \
|
||||
gettext
|
||||
|
||||
COPY --from=frontend-builder /frontend/dist /usr/share/nginx/html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user