mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Feature: Add ahead of time compression of the static files for x86_64 (#4390)
Compressed staticfiles. x86_64 only at this point
This commit is contained in:
		| @@ -7,6 +7,7 @@ import re | ||||
| import tempfile | ||||
| from os import PathLike | ||||
| from pathlib import Path | ||||
| from platform import machine | ||||
| from typing import Final | ||||
| from typing import Optional | ||||
| from typing import Union | ||||
| @@ -342,6 +343,17 @@ ASGI_APPLICATION = "paperless.asgi.application" | ||||
| STATIC_URL = os.getenv("PAPERLESS_STATIC_URL", BASE_URL + "static/") | ||||
| WHITENOISE_STATIC_PREFIX = "/static/" | ||||
|  | ||||
| if machine().lower() == "aarch64":  # pragma: no cover | ||||
|     _static_backend = "django.contrib.staticfiles.storage.StaticFilesStorage" | ||||
| else: | ||||
|     _static_backend = "whitenoise.storage.CompressedStaticFilesStorage" | ||||
|  | ||||
| STORAGES = { | ||||
|     "staticfiles": { | ||||
|         "BACKEND": _static_backend, | ||||
|     }, | ||||
| } | ||||
|  | ||||
| _CELERY_REDIS_URL, _CHANNELS_REDIS_URL = _parse_redis_url( | ||||
|     os.getenv("PAPERLESS_REDIS", None), | ||||
| ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Trenton H
					Trenton H