Skip to content

Commit

Permalink
full compression support
Browse files Browse the repository at this point in the history
  • Loading branch information
randomairborne committed Jan 19, 2024
1 parent 6f77554 commit c733c55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit c733c55

Please sign in to comment.