This repository has been archived on 2023-08-24. You can view files and clone it, but cannot push or open issues or pull requests.
2023-01-19 00:40:36 +00:00
|
|
|
FROM fedora:latest as compressor
|
2023-01-19 01:19:45 +00:00
|
|
|
RUN dnf install brotli nodejs npm -y && npm i uglify-js -g
|
2023-01-19 00:40:36 +00:00
|
|
|
COPY . /data/
|
|
|
|
RUN rm -r /data/nginx
|
2023-01-19 01:19:45 +00:00
|
|
|
RUN uglifyjs /data/js/*.js --compress --mangle
|
2023-01-19 00:40:36 +00:00
|
|
|
RUN gzip -k -9 /data/*.json
|
|
|
|
RUN gzip -k -9 /data/styles/*.css
|
|
|
|
RUN gzip -k -9 /data/js/*.js
|
|
|
|
RUN gzip -k -9 /data/*.html
|
|
|
|
|
|
|
|
FROM nginx:mainline-alpine-slim
|
|
|
|
RUN rm /etc/nginx/nginx.conf
|
|
|
|
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
COPY --from=compressor /data/ /site-static/
|