Sign inSign up

appmasterio/stat-compressor

By appmasterio

•Updated 5 days ago

Static assets precompressor with gzip, brotli, zstandard

Image
Integration & delivery
Developer tools
Web servers
0

2.7K

appmasterio/stat-compressor repository overview

Docker image to help precompress static assets for faster serving via nginx static compressed files support (gzip_static / brotli_static). Every compression codec uses the best level of compression, zstd is disabled by default.

Ideal for resource constrained environments, when you can use all available CPU for compression.

Compressed file types: js, mjs, cjs, css, html, htm, xhtml, json, map, webmanifest, xml, rss, atom, svg, wasm, ico, ttf, otf, eot, txt, md, csv, tsv, yaml, yml. woff/woff2, images, video and pdf are deliberately skipped - they are already compressed internally, recompressing grows the files.

Environment variables: ENABLE_ZSTD (default false), OVERWRITE_FILES (default false). Optional first argument overrides the directory to process (default /app).

Example

docker run --rm -v /path/to/files:/app --cpus=".25" --cpu-shares=256 --memory="256m" -e ENABLE_ZSTD=false -e OVERWRITE_FILES=false appmasterio/stat-compressor

Tags: X.Y.Z / X.Y / latest, multi-arch (amd64 + arm64). Built on the free tier of Docker Hardened Images (dhi.io), no package manager in the final image, rebuilt weekly with all security updates applied.

Tag summary

Content type

Image

Digest

sha256:61cddb313…

Size

3.4 MB

Last updated

5 days ago

docker pull appmasterio/stat-compressor