18 lines
527 B
Docker
18 lines
527 B
Docker
FROM fedora:latest as compressor
|
|
RUN dnf install brotli -y
|
|
COPY . /data/
|
|
RUN rm -r /data/nginx
|
|
#RUN brotli -q 9 /data/*.json
|
|
RUN gzip -k -9 /data/*.json
|
|
#RUN brotli -q 9 /data/styles/*.css
|
|
RUN gzip -k -9 /data/styles/*.css
|
|
#RUN brotli -q 9 /data/js/*.js
|
|
RUN gzip -k -9 /data/js/*.js
|
|
#RUN brotli -q 9 /data/*.html
|
|
RUN gzip -k -9 /data/*.html
|
|
|
|
FROM nginx:mainline-alpine-slim
|
|
#RUN apk add nginx-mod-http-brotli
|
|
RUN rm /etc/nginx/nginx.conf
|
|
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
|
|
COPY --from=compressor /data/ /site-static/ |