diff --git a/Dockerfile b/Dockerfile index 2d2bfc0..9f484b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM alpine AS compressor +FROM alpine AS client-builder -RUN apk add zstd brotli gzip +RUN apk add zstd brotli pigz COPY /assets/ /assets/ -RUN find /assets/ -type f -exec gzip -k9 '{}' \; -exec brotli -k9 '{}' \; -exec zstd -qk19 '{}' \; +RUN find /assets/ -type f ! -name "*.png" -exec pigz -k9 '{}' \; -exec pigz -zk9 '{}' \; -exec brotli -k9 '{}' \; -exec zstd -qk19 '{}' \; FROM rust:alpine AS builder diff --git a/src/main.rs b/src/main.rs index 106ae15..1222d01 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,7 +44,8 @@ async fn main() { .append_index_html_on_directories(true) .precompressed_gzip() .precompressed_br() - .precompressed_deflate(); + .precompressed_deflate() + .precompressed_zstd(); let app = axum::Router::new() .route("/api/:address", get(handle_java_ping)) .route("/api/java/:address", get(handle_java_ping))