Skip to content

Commit aa8ad15

Browse files
authored
Remove Brotli dependency (#259)
Since the Brotli dependency adds ~7-8MB (depending on arch) to the app image (along with having to download/install the wheel during the build), and isn't currently used by the Getting Started guide, since it doesn't have any static assets that are compressible. ``` $ ls -alh /layers/heroku_python/venv/lib/python3.13/site-packages/ ... -rwxr-xr-x 1 heroku heroku 7.2M Jan 1 1980 _brotli.cpython-313-aarch64-linux-gnu.so ``` ``` $ ls -al /workspace/staticfiles/ total 16 drwxr-xr-x 2 heroku heroku 4096 Jan 1 1980 . drwxrwxrwx 5 heroku heroku 4096 Jan 1 1980 .. -rw-r--r-- 1 heroku heroku 2217 Jan 1 1980 lang-logo.019c8743b7cf.png -rw-r--r-- 1 heroku heroku 100 Jan 1 1980 staticfiles.json ``` See: https://whitenoise.readthedocs.io/en/latest/django.html#brotli-compression GUS-W-18705397.
1 parent 2a0d760 commit aa8ad15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gettingstarted/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
STATIC_URL = "static/"
197197

198198
STORAGES = {
199-
# Enable WhiteNoise's GZip and Brotli compression of static assets:
199+
# Enable WhiteNoise's GZip (and Brotli, if installed) compression of static assets:
200200
# https://whitenoise.readthedocs.io/en/latest/django.html#add-compression-and-caching-support
201201
"staticfiles": {
202202
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
django>=5.2,<5.3
22
gunicorn>=23,<24
33
dj-database-url>=2,<3
4-
whitenoise[brotli]>=6,<7
4+
whitenoise>=6,<7
55

66
# Uncomment these lines to use a Postgres database. Both are needed, since in production
77
# (which uses Linux) we want to install from source, so that security updates from the

0 commit comments

Comments
 (0)